06-26-04 03:55 PM
Ashley Swinson wrote:
> I added the following code to my httpd.conf file to set up a virtual host:
>
> NameVirtualHost 192.168.21.2
>
> <VirtualHost 192.168.21.2>
> DocumentRoot "C://sites/site1"
> ServerName site1.com
> </VirtualHost>
>
> Then, I put the html code (site1.html) in the DocumentRoot.
>
> Then, I added the following line of code to my HOSTS file:
>
> 192.168.21.2 site1.com
>
> Now, when I open a browser and type in site1.com or 192.168.21.2, it gives
> me this message:
>
> "Forbidden
> You don't have permission to access / on this server"
>
> How to I fix this so that I/clients can view the webpage?
You just need a Directory section, e.g.
<Directory C:/sites/site1>
Order allow,deny
Allow from all
</Directory>
That should fix it. By default, the Apache configuration locks down all
directories except its own default htdocs directory, for security
reasons. You need to open up any directories that you want to serve to
the world.
--
Jim Patterson
Ottawa, CANADA
[ Post a follow-up to this message ]
|