[afnog] virtual hosting on apache 2 problem

Stephane Bortzmeyer bortzmeyer at nic.fr
Mon Mar 20 11:16:17 EAT 2006


On Thu, Mar 16, 2006 at 11:15:42AM -0800,
 Yahaya Wara <mywarra at yahoo.com> wrote 
 a message of 56 lines which said:

>     DocumentRoot /var/www/serc
>     ServerName www.serc.org.ng

Personal advice: I use the FQDN (Fully-Qualified Domain Name) for the
directory (here, /var/www/serc.org.ng) since I had to host a ".com"
and a ".fr" with the same name (but different contents).

> I have tried to access a file in serc's web directory by
> www.serc.org.ng/index.htm But still got the permission error
> (Forbidden:You don't have permission to access / on this server.

Remember that you need 'x' permission on every directory in the
path. Check the output of 'ls -ld' on each directory of the path?

> I have set all directory and file permissions in the serc's
> directory 777 in order to test it.

NEVER DO SO even for testing! (Unless the machine is buried in a
concrete basement, with no network connectivity.) There are too many
Web worms in the wild, looking for such vulnerabilities.



More information about the afnog mailing list