Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to fix 403 Forbidden?

Status
Not open for further replies.

mfleming

Technical User
Jul 2, 2003
65
CA
Hello.

I just installed Apache v2.2 on Win XP SP2. I'm using this tutorial to setup my web server. I have got everything done, but when I try and go to my site I get

"403"

Forbidden

You don't have permission to access / on this server.

I have index.html files in the root of the website also.

What do I need to change to fix this. I have been searching all morning to find the answer and knowone has a straight answer.


Thanks

Viper
 
First, make sure that your document root is where you think it is. Second, make sure that the apache user has read access to this document root folder & the the index.html within (I'm not sure what user apache runs as under windows). Third, (should probably be first) check the error log.
 
Checked doc root in "virtual-hosts.txt" file and everything is fine.

Checked the Apache log file, no errors or warnings.

How do I make sure apache user has read access in root folder and index.html file? Where would I change this?

I checked the error log in my Testing site I created and it showed this.

[Sat May 27 19:53:31 2006] [error] [client 127.0.0.1] client denied by server configuration: .../My Company/Customers/Testing/site/web/

What next?

Viper
 
So .../My Company/Customers/Testing/site/web/ does contain an index.html file?

What happens if you add /index.html to the end of the URL in your browser adress bar? Then what's in the error log?
 
Smah is correct. You don't have the DocumentRoot defined correctly or you don't have the correct path in its directory container. The path to both need to be the same. If your vhosts are not in httpd.conf then the file you use for vhosts need to be in the conf.d directory or added to the "Include" directive in httpd.conf.
 
Change your Virtual Host to
Code:
<VirtualHost _default_:80>
    ServerName [URL unfurl="true"]www.Testing_loserss.com[/URL]
    ServerAlias Testing_loserss.com
    DocumentRoot "C:/Documents and Settings/Viper/My Documents/My Company/Customers/Testing/site/web"
    ErrorLog "C:/Documents and Settings/Viper/My Documents/My Company/Customers/Testing/site/local-logs/error.log"   
    CustomLog "C:/Documents and Settings/Viper/My Documents/My Company/Customers/Testing/site/local-logs/access.log" combined

    <Directory />
         Options ALL
         AllowOverride ALL 
         Order allow,deny
         Allow from all
    </Directory>
</VirtualHost>

M. Brooks
 
The directory container mbrooks has added tells apache who can do what in that directory. You can also get rid of the "_default_" for the directory container. You can just do this; <VirtualHost *:80>

 
The worked perfectly.

Thanks soo much.

Viper

End of Thread

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top