This is exactly what I have set up right now:
cd /var/www mkdir -p test cd /var/www/test sudo nano index.html cd /etc/apache2/sites-available sudo nano test.conf
<VirtualHost *:80>
ServerName localhost223.com
DocumentRoot /var/www/test
</VirtualHost>
$sudo a2ensite test.conf $sudo service apache2 reload
I can access my page like this:file:///var/www/test/index.html
in web browser.
<html>
<h1>
here
</h1>
</html>
But I cannot do access: http://localhost223.com
I get the error: Could not resolve host
How to resolve this issue?
127.0.0.1 localhost223.com
in the/etc/hosts
file? – George Udosen Aug 23 '17 at 20:56