Debian – Apache website access

apache-httpddebian

I have to install and configure Apache in Debian, it all works fine, and in one point I have to use Lynx to show it works. I have edited the configuration page like this:

(VirtualHost *:80)
 ServerName page.com
 ServerAlias www.page.com
 DocumentRoot /var/www/page1

 ErrorLog /var/log/apache2/error_site_page
(/VirtualHost)

then I use Lynx to access www.page.com and it says Unable to access document.
But if I try to access just page.com it works fine.

Best Answer

Generally, allowing other systems to access the site under www.page.com requires it to be added to a DNS server telling that all traffic to www.page.com should go to page.com through a so called "alias". Generally you add that to the same DNS server that holds the " page.com" entry.

Note that adding "www.page.com" to you /etc/hosts (as suggested in the comments) will only fix accessing it from the system were you have added it. So if you add it to the hosts file of the system running the Apache instance, it will only work on that system.

Related Question