Apache Server Tips: 403 Forbidden

Web - ServerImage by hekman2007 via Flickr

Here is
If you have been working with Apache Tomcat Servers recently and had problem accessing page on your server. Probably, you have inherited somebody's configuration and when you tried to access page got this message:


You don't have permission to access /babic/ on this server.
Apache/1.3.33 Server at ******* Port ###

All you have to do is to change permissions for your public directory, which this command:

$> chmod o+x ~

and !voilà!

Possible reason of this behavior:

You have a .htaccess file that does not have adequate unix file permissions. The file needs to be world-readable.
Solution: Chmod the .htaccess file to give it the required permissions:

chmod o+r ~/public_html/.htaccess ~/.htaccess
Or more completely:

chmod o+r `find ~ -name .htaccess -print`
Possible reason: The index file for your web pages, "index.html", does not exist.
Solution: Create your main index.html file, and give it the required permissions:

touch ~/public_html/index.html
chmod o+r ~/public_html/index.html

No comments:

Post a Comment