It's worth checking that the default site is actually disabled. You haven't stated which Ubuntu version you're using, but in most versions, Ubuntu versions of Apache come with the lines:
# Include generic snippets of statements
IncludeOptional conf-enabled/*.conf
# Include the virtual host configurations:
IncludeOptional sites-enabled/*.conf
inside /etc/apache2/apache2.conf
. Make sure those lines are in, or Apache won't know to look inside that folder for its configs. If you list the contents of:
ls /etc/apache2/sites-enabled/
If you used a standalone configuration for your virtualhost in /etc/apache2/sites-available
you should only have your site available in there, and not the default site.
It is also worth using your domain name rather than your IP address, as aready mentioned. You may, at some point, want to host other content in that server.
If this is the only virtual host you will have, you can do without the ServerName
line. Try commenting it out (put a #
at the start of the line).
Finally, after making sure that you have only the virtual hosts you want in /etc/apache2/sites-enabled
, restart Apache in order to load the new configurations:
sudo systemctl restart apache2
Your new configuration won't load until you do so.
The error about www-browser
is strange. How did you install Apache? It means that there is no command-line browser installed. You could install Lynx and this should fix it (sudo apt install Lynx
), but I'm doubtful that this is the cause of the default page being shown instead of your own. Again, after any change, reload Apache with sudo systemctl restart apache2
.