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?
Error code that start with 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
Featured Articles:
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- My 10 UNIX Command Line Mistakes
- Linux: 20 Iptables Examples For New SysAdmins

- 25 PHP Security Best Practices For Sys Admins
- The Novice Guide To Buying A Linux Laptop
- 10 Greatest Open Source Software Of 2009
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- Top 20 OpenSSH Server Best Security Practices
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Linux Video Editor Software
Facebook it - Tweet it - Print it -


{ 87 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:
pls i want to see a gem code
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
Check the file “projectconsole” exists or not??
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
I am trying to setup virtual hosts on my development machine running win xp pro, apache 2.2
Tested several variations.. nothing seems to work yet. Here is what I have in the httpd-hosts.conf file… any suggestions for the windows users out there?
NameVirtualHost *.80
DocumentRoot C:\Site1
ServerName site1.local
This error message .plz solve this Access is forbidden to the requested page:
174.142.39.75/~kethez/tamil/chatt/tschat.php (port 80)
Please forward this error screen to 174.142.39.75′s WebMaster.
——————————————————————————–
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 174.142.39.75 Port 80message . help me
You can get this error in everyone of Google’s Products. It’s simply a corrupted cookie problem.
When you receive Google Error 403 Forbidden simply delete the Google.com cookies, restart your browser, and sign in again to get fresh cookies.
I don’t know what causes this error or how to fix it. But this is a good workaround until a fix is discovered.
i have full errors in tagged web site.iam unable to open any friend page and iam loosing friends too.in my view it is a wasteless web site.
hellow this is bhargav patel.
whenever i search any documents from google then i got this type error.so wat is solution for it.
pls send me solution.
We apologize for your inconvenience, but this request could not be processed.
Please click here to continue your search on Google.
i configured the apache but give the forbidden error.
and in error log forbidden /www/docs error
I would if someone help me to resolve “Apache 403 Forbidden Error”. I was fine until yesterday and unfortunately it was encountered today and I have no knowledge what could cause it. I don’t know computers a lot and try to avoid being a computer scientist. However something might have happened because of no innocense.
Thanks.
I think it’s such a wired thing that it’s actually related to permission issue. The working solution can be found in http://ubuntuforums.org/archive/index.php/t-763605.html .
What you could do is:
$ sudo mv images Images
$ sudo mkdir images
$ sudo cp -R ./Images/* ./images/
$ sudo chmod -R 775 ./images/
$ sudo chown -R root:www-data ./images/
$ sudo rm -r ./Images
Duplicate a folder and then reset all file permissions required. Everything works FINE AGAIN!
Thank you.
Option “e” solved my problems running WAMP with Vista. I’ve been looking for a solution for days.
Thanks again.
I get and still gets 403 error on /var/www/piwi http://server/piwi/ ?
when i copy the inside files of /usr/share/piwi whole apache goes doen
so i ln -s the inside files *.pl and folders from /usr/share/piwi/ to /var/www/piwi/
made a good alias for it,
chmodded it multiple ways but still gets 403
piwi is an webinterface for prelude IDS
if you create a directory with mkdir and use a mode other than 0777 you cant access this directory using http. be carefull.
my script alias pointed to folder that did not exist. that was my issue and was getting 403.
so check your paths!
ScriptAlias /cgi-bin/ “C:/DOCUME~1/davidj411/MYDOCU~1/web/www/cgi-bin/”
Hi All,
I am running wampserver and Apache 2.2 on windows 2003.
I have set <Directory to "allow from all" and I am still getting "You don't have permission to access / on this server." error when accessing the site from locations other than the host server.
Can anyone help please!
Kind Regards
when working with php,i use to have this error in database but on the internt,apache can not be run,apache is block with firewall,what should i do?
apache cannot be run on the system
database error ,403apache,whenever am working with database,this error always appear,what should i do?
I had the same problem with a Apache 2.2 server on windows xp, but I solved it doing the following. In the httpd.conf file
1. Set the DocumentRoot to whatever directory I want
DocumentRoot “C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/MyRootDirectory”
2. Set the tag to point to the same directory ___But using the backslash!!!__
Sorry, the message has missed information due to brackets:
the tag is the Directory tag and the sample value is “C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\MyRootDirectory”. Note that here I use backslashes and in DocumentRoot I use forward slashes
Great article! Thank you so much!
Thx so much for all answers. It helped me so much…
Hi,
I am using Mercurial as repository for project using Apache 2.2. While accessing the link it shows me the error
HTTP Error 403 – Forbidden
You might not have permission to view this directory or page using the credentials you supplied.
The above error I am getting when I am using domain name to access the repository but for local it is not giving the error.
Any pointer will be helpful
My site many times shows this error and then I go to a pro for solution.
But next time I will try it myself.
I fixed my problem by replacing
Options +Indexes FollowSymLinks +ExecCGI
AllowOverride AuthConfig FileInfo
Order allow,deny
Allow from all
With:
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
Options +FollowSymLinks
RewriteEngine on
ErrorDocument 404 /404/
ErrorDocument 403 /403.html
order allow,deny
deny from 114.92.
allow from all
i use this method, but 403error is not my page.
how can i do it?
Thanks a lot!!!
Olivier
thanks big help.
I’m an EXTREME newbie to the tech world, but the homepage itself of my website works, but any time I try to get to a subdirectory it turns up this error:
Not Found
The requested URL /armor/ was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Apache/2.2.16 (Unix) mod_ssl/2.2.16 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Server at www. .com Port 80
I have access through ftp and wordpress to make any changes, I just need to know what changes to make, please help!
Setup mod_rewrite for your wordpress.
I have a strange problem.
I have only index.html in my dir and get 403 error.
When I replace it with index.php all OK
I am a current college student and starting to use the Niihka website for classes and i am one of the few that get to test the pilot version and i somehow can not get through to the server because of this ( excuse the fact that i have never heard of this product in my entire technological life) Apache Tomcat domain. i get the same error message 403 when i am trying to download files onto my server i am using an HP with vista and i am concerned that this may be an issue when using the Niihka for the rest of the semester and need help pronto. please if you know anything about this let me know thanks!!!
Hi,
In trying to reach a website, I get the following error:
Forbidden
You don’t have permission to access /news/index.php on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
I have a mobile internet and Windows 7 with Internet explorer. How can I get out of this problem?
Thank you for any help you might give me.
Thank you so much! This is the only answer I’ve found in my 2 hours of searching that actually helped to solve my problem
Thanks for the logs suggestion. Turned out that the read permissions for ” others ” were denied.
Hello guys, as many of you up here, I have the same problem and one more, I don’t have a lot of experience on linux, and now, i’m trying to make website on linux but I get the (“Access forbidden!
You don’t have permission to access the requested object. It is either read-protected or not readable by the server.
If you think this is a server error, please contact the webmaster.”)
I hope some 1 can help me by explaining step by step because i really suck on linux :p
thanks a lot
Error 403
localhost
Mon Mar 28 00:54:23 2011
Apache/2.2.15 (Linux/SUSE)
……… or maybes? the Website is under considerations and is updatings herself.
you can try later on.
example: NO BROWSER/s is helpful to help/s to fix this problem >>>>
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.
I had this issue on my local sandbox env. I figured out eventually that my home directory was set to no access for all, and I needed to change it to read only. After f****** with httpd.conf for at least an hour, I was quite relieved to have figured this out.
System Preferences -> Sharing -> File Sharing (check it), then select your home directory and fix the “Everyone” permission to “Read only”.
Hello Guys,
As I have some problem please help me.
Apache directory consist cgi-bin directory. As I browse the path of cgi-bin through browser I get 403 response.As a secure point of view its better to show 404.
How can I do it?
Thanks in advance..
which program should I use to write the given commands !?
like:
$ chmod +x file.cgi , etc !?
It refers to unix/linux users… which you apparently not one..
Pls can somebody help me out,I am working with my server but I dont know how it turned back 2 tell me that I forbiden from hph that 403 error forbidden additionally i am tryin 2 use error document.Pls what do that mean.And have exam today I need browse it out.Pls i beg 4 ur urgent aid
Hi there..
can support for my problem?
I got error 403 after file chmod permission on my ftp site
and I cant fix this
helppp…..
Thank you so much! This is the only answer I’ve found in my 2 hours of searching that actually helped to solve my problem
Recently I often receive on my e-mail a mail from (same) person. I know this person ,(my sister in law)
The message sais “HTTP 403 Forbidden. I am sure she is not sending me any XSXX or something like that.
What can I do to get rid of that? Her e-mails are coming from her to sevreal other people.
help problema 403 after install csf firewall,
remove but problem no resolve
im still having this error. I dont understand how to fix this. Can someone help me through teamviewer?
delete the file name .htaccess
it can solve your problem (just for a while)
please help me how to login this web page.
my web is showing forbiden error403
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.
SELinux is also a very likely culprit on RHEL/CentOS systems.
See: http://www.phpfreaks.com/forums/index.php?topic=243271.0
Try this command:
chcon -R -h -t httpd_sys_content_t /web/directory/
I found that the default security in version 2.2 and beyond does not include the localhost directory. (C:\Program Files\Apache Software Foundation\Apache2.2\htdocs) You need to add a setting allowing scripts run from this directory (This is so Stupid!)
what to do:
Version 2.2 also changed some of the default security configuration parameters. To set things up the way you’ll need them, you’ll need to add the following block to either your httpd.conf file, just above the virtual hosts, or to your httpd-vhosts.conf file:
Order Deny,Allow
Allow from all
Do this for any directory you setup using Virtual hosts as well. Just change the directory and leave everything else alone.
thx, you made my day!
Thanks for the tips.
Eventually what solved the problem for me was changing permission within the .htaccess file which was located in my root directory (www).
I installed Apache server on Windows XP. When I connected as localhost everything worked fine. When I tried to connect through another browser using the IP address, I got an error message
“403 Forbidden You don’t have permission to access / on this server.”
Changing the permissions within the .htaccess file from “Deny from all” to “Allow from all” did the trick.
Thanks.
hi i was successfully on website then suddenly bounced off was just lurking for several hours,the little login box would not let me log back in i tried clearing cookies no luck can you help me get reconnected tanxxxxx
Thanks, very helpful i only needed to read the first couple of paragraphs to have my problem solved.
Sir, i have a problem in my cell Nokia- C5 that whenever i use to download any video .After 1 or 2 minute there occurs error code 403 forbidden and downloading fails.plz suggest me what i have to do.
Curious behaviour in apache for windows (2.2.16), without “\” ending the directory in an Alias I get a 403, added to the path and then everything’s ok…
If you’ve set up the alias correctly and your permissions are okay and you’re STILL getting a forbidden error when you try to access your file, I may have the solution for you. Your operating system may be running SELinux (Security Enhanced Linux) which could limit your permissions to files beyond the normal linux protection mechanisms. To test, run the command “setenforce 0″ to set SELinux to permissive mode, then try again. This fixed a problem for me that I had been struggling with for quite a while.