Q. I have successfully configured Apache web server for my client. But why does my clients website just say "Error 403 Forbidden"? For example when client send request http://myclient.com/something/ Apache generate a 403 error. How do I troubleshoot this problem?
A. Error code start 4xx is generated because of client browser request. A 403 error code means client browser (or person who is trying to access your site) cannot access the requested URL. It can be caused by many reason:
a) A 403 status code indicates that the client cannot access the requested resource. It means the wrong username and password were sent in the request, or that the permissions on the server do not allow what was being asked.
b) No default directory index page is present. Upload Index.html or Index.htm file. Directive DirectoryIndex defines the default index page name. Open your apache configuration file, find out default index file name, and upload the same file to directory:
DirectoryIndex index.html index.cgi index.pl index.php index.xhtml
c) Make sure the CGI script requested have executable permissions set on files. Use chmod command to set permission:
$ chmod +x file.cgi
d) Make sure you have permission to use .htaccess file for Apache web server. If Apache has overrides disabled. you will bump back with a 403 error.
e) Make sure correct directory permissions are set on directory:
<Directory "/home/domain/www">
Options +Indexes FollowSymLinks +ExecCGI
AllowOverride AuthConfig FileInfo
Order allow,deny
Allow from all
</Directory>
f) Make sure the underlying file system permissions allow the User/Group under which Apache is running to access the necessary files. You can determine which case applies to your situation by checking the error log. In the case where file system permission are at fault, remember that not only must the directory and files in question be readable, but also all parent directories must be at least searchable by the web server in order for the content to be accessible. For example /home/httpd/theos.in/ must be searchable, enter:
# chmod +x /home/httpd/theos.in/
g) You should also check the logs for any errors:
# tail -f /path/to/apache/error.logs
- Email FAQ to a friend
- Printable version
- Rss Feed
- Last Updated: 12-19-08

{ 27 comments… read them below or add one }
I had the same problem. I was doing some testing and have installed PHP 5 on a development server. I had a site installed on the server that was working correctly, complete with quite an elaborate .htaccess file handling many redirects and rules. However, after installing PHP5 it turns out any php file I tried to view just returned a 403 Forbidden error. I began to scratch my head. Searching on Google didn’t immediately bring up a solution either. However, I eventually narrowed it down to the fact that I needed to add Options +FollowSymLinks to my .htaccess file. That solved it all.
#chmod a+x /home-dir-where-apache-installed
ex: chmod a+x /home/test
This will fix the problem
I am having the same problems with my Apache server, however I am running it off of Windows XP. Would my solution be the same as the steps above, can someone “dumb it down” for me?
Andrew, which OS ?
Just a quick reminder guys; mind the back-slashes on your apache config file when naming your domain and path. My Error 403 came as a result of that; but now that everything is up! I’m coooooool.
Sho!
I am an Apache/linux newbie. (Trying to learn this technology…)
I setup a Mandrake 10.1 server, and am trying to setup virtual hosting.
I created a user and a www folder. Set the www folder permission to 777.
I created a virtual server as follows:
DocumentRoot “/home/domain/www”
ServerName *.domain.com
allow from all
Options +Indexes
DirectoryIndex index.html index.htm default.htm
I added the DirctoryIndex line, but get the same error with or without that line.
If I try to browse any file including the root site, I get the following error message:
Forbidden
You don’t have permission to access / on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
I’m assuming that this is a permission based issue, however I have 777 permissions set, so it should work. Any help would be appreciated!
Thanks!
Set dir options as follows and restart apache:
I am having the same problems with my server
please can solve my problem
I had this error on Apache on WIndows Vista… after some experimenting around I found that for some reason the doc files had been encrypted. Even though I could open/edit/save them, Apace could not. Which is strange as I made perms open to Everyone for Full Control. Anyway, once I selected All and set not to encrypt, then Apache was able to open and send them to the client.
Forbidden
You don’t have permission to access /pages/index.php on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
Apache/1.3.41 Server at depacco.com Port 80
vista ultimate sp1 usinf mizile firefox3.0.5
wht i will to slove the problem????????????????
can anyone help me out of this problem. I couldn’t solve this problem for a week.
issue : [error] [client 127.0.0.1] File does not exist: C:/Apache2/htdocs/projectconsole
what is the solution
i have a probleme with service http in nagios.when i want to access to look the status of my localhost ->all service are ok ,but http send me a message:403 forbiedeen
I’m getting the “403″ error message when i use flash and php
I have a problem. its been a month and at first i thought the website was down and it will be back to normal i like. 2 days.. but its still going. i don’t know what to do now. and like.. i don’t know what apache and stuff so can you like guide it down to clicks?
Forbidden
You don’t have permission to access / on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
——————————————————————————–
Apache/2.2.9 (Unix) mod_ssl/2.2.9 OpenSSL/0.9.7a mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Server at gatheringro.ch Port 80
Help please!!
In your virtual host conf file for the site, what are the values, if any, for the following directives:
VirtualHost
NameVirtualHost
They should look something like this
VirtualHost *.80
NameVirtualHost *.80
If you have a specific IP address specified in either directive, remove it and replace it with a *.
Weird power outages can also cause a broadband modem to power cycle and lease a new IP address. Becuase you have a dynamic IP address and your site stopped working spontaneously, I’m guessing that your conf file states an explicit IP address to listen on. When your IP address changed it broke the directive, causing Apache to no longer accept requests for your site.
I am using apache2.2 (on windows 2003) & I am getting 403 error which says “This website requires you to log in” please can some one suggest any workaround
I just read over the postings and adding an index file sounds easy. But what happens if your site has over 800 folders ie a very large organization. The server is showing a forbidden page even though it’s ugly can we not change that page? Or have the server point to a custom 404 page? I don’t want to go around sticking index files in with meta redirects to a 404 page or to the homepage. Suggestions please would be FANTASTIC!
Thanks.
C
Turn on fancy indexing or something line this:
and Upload /noindex.html with custom message.
Thanks Vivek Gite… I’m going to try that out.
Cheers
Z
plz give me a step by step instruction, on how to solve these problem.. dnt know where cn i find those settings.. the probs is when i type cebudogs.com in my address browser, the text showed are..
(your help would be much appreciated..)
Forbidden
You don’t have permission to access / on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
——————————————————————————–
Apache/2.2.9 (Unix) mod_ssl/2.2.9 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 PHP/5.2.3 mod_perl/2.0.4 Perl/v5.8.8 Server at cebudogs.com Port 80
to “best”:
your message
“Weird power outages can also cause a broadband modem to power cycle and lease a new IP address. Becuase you have a dynamic IP address and your site stopped working spontaneously, I’m guessing that your conf file states an explicit IP address to listen on. When your IP address changed it broke the directive, causing Apache to no longer accept requests for your site.”
which gave me an idea that prior to my 403 error, we had a power interruption. what i did was to power cycle the router’s and internet’s power adapter (plug/unplug) and then all was back to normal.
thanks much! \(><,)/
indie
I get this error when I try to access a particular program , I can go next door and use their computer and it comes through perfect, only difference are the ISP we use,
As I am not computer savvy I have no idea what all that means.
Can some one please help in newbie talk
Forbidden
You don’t have permission to access / on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
——————————————————————————–
Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 PHP/5.2.9 Server at cris.hobo-studios.org Port 80
I have a problem. Everytime I want to publish a post on my blogger using Windows Live Writer, it’ll say Error 403 Forbidden? why why why? can anyone help me???? please and thank youu.
i have the same problem in in host way
thanks my friend
Sorry but it’s not working,
I’m using fedora 10 that I had recently installed, and i have realized that yum install scatters files all the disk. So I want build every from binary code so that i can keep my location consistent, but every time make install THIS IS THE MESSAGE I GET after the command # /.configure
[root@localhost httpd-2.2.11]# ./configure
checking for chosen layout… Apache
checking for working mkdir -p… yes
checking build system type… i686-pc-linux-gnuoldld
checking host system type… i686-pc-linux-gnuoldld
checking target system type… i686-pc-linux-gnuoldld
Configuring Apache Portable Runtime library …
checking for APR… reconfig
configuring package in srclib/apr now
checking build system type… i686-pc-linux-gnuoldld
checking host system type… i686-pc-linux-gnuoldld
checking target system type… i686-pc-linux-gnuoldld
Configuring APR library
Platform: i686-pc-linux-gnuoldld
checking for working mkdir -p… yes
APR Version: 1.3.3
checking for chosen layout… apr
checking for gcc… no
checking for cc… no
checking for cl.exe… no
configure: error: in `/home/smarty/Download/httpd-2.2.11/srclib/apr’:
configure: error: no acceptable C compiler found in $PATH
See `config.log’ for more details.
configure failed for srclib/apr
PLEASE HELP, on top of that its the 403 ERROR