0

I'm getting a 403 Forbidden error on my client's server (which somebody else set up). I'm using Apache on CentOS. Since somebody else set up the server, and since the server is CentOS and not the Ubuntu I'm used to, I don't know how to fix the problem.

Any advice on how to troubleshoot this problem?

Edit: in the logs, I keep getting this series of notices/warnings:

[Mon Feb 06 09:45:43 2012] [notice] caught SIGTERM, shutting down
[Mon Feb 06 09:45:44 2012] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Mon Feb 06 09:45:44 2012] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!?
[Mon Feb 06 09:45:44 2012] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!?
[Mon Feb 06 09:45:44 2012] [warn] Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Mon Feb 06 09:45:44 2012] [notice] Digest: generating secret for digest authentication ...
[Mon Feb 06 09:45:44 2012] [notice] Digest: done
[Mon Feb 06 09:45:44 2012] [notice] mod_bw : Memory Allocated 0 bytes (each conf takes 32 bytes)
[Mon Feb 06 09:45:44 2012] [notice] mod_bw : Version 0.8 - Initialized [0 Confs]
[Mon Feb 06 09:45:44 2012] [notice] mod_python: Creating 4 session mutexes based on 50 max processes and 0 max threads.
[Mon Feb 06 09:45:44 2012] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!?
[Mon Feb 06 09:45:44 2012] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!?
[Mon Feb 06 09:45:44 2012] [warn] Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Mon Feb 06 09:45:44 2012] [notice] Apache/2.2.19 (Unix) DAV/2 mod_fcgid/2.3.6 mod_python/3.2.8 Python/2.4.3 mod_ssl/2.2.19 OpenSSL/0.9.8f mod_perl/2.0.4 Perl/v5.8.8 configured -- resuming normal operations

Edit 2: here's my VirtualHost stuff:

<VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot /var/www/html
</VirtualHost>
3
  • tail -f /var/log/httpd/error_log then hit the page that gives you the 403.
    – user9517
    Feb 6, 2012 at 19:47
  • @Iain It looks like hitting that page actually doesn't add anything to my error log. Feb 6, 2012 at 19:54
  • what about SELinux? Is it enabled? check /var/log/audit/audit.log
    – drafael
    Feb 6, 2012 at 20:45

2 Answers 2

1

The first thing to do is go look in the error log which would normally be found in /var/log/httpd/error_log. If the error log isn't in it's default location then you should look in /etc/httpd/conf and /etc/httpd/conf.d configuration files that may contain ErrorLog directives.

3
  • Oh yeah, good suggestion. I already looked there but didn't know what to make of what I found. I updated my question to include relevant error log output. Feb 6, 2012 at 19:31
  • @JasonSwett Can you provide the config for the virtualhost that you're having issues with? Feb 6, 2012 at 19:38
  • @ShaneMadden Edited question to include that. Feb 6, 2012 at 19:47
0

What is the full error message you get when visiting the page? In my experience this is either an issue with permissions, mod_sec (ModSecurity Module) blocking you and you need to whitelist the rule, or you're trying to view a directory where Apache is configured to forbid directory listing. I'm not a pro by no stretch but this is my input.

Hope this helps.

5
  • Thanks for the input. It's just "Forbidden - You do not have permission to access this document." How do I check for either of those two causes being the case? Feb 6, 2012 at 20:04
  • This sounds like a mod_sec issue. I would check the permissions on the file - SSH into the server, 'cd' to the directory where the file is, 'ls -sail' to list files and information about them, i.e. permissions (will be the third column -rwx--r--r <- looks like this).
    – g3nu1n3
    Feb 6, 2012 at 20:08
  • I recursively chmodded the whole directory to 777, just to be sure that wasn't the issue. Feb 6, 2012 at 20:16
  • I'm not sure how to check if you have mod_sec installed but the log is normally here - /var/log/httpd/modsec_audit.log
    – g3nu1n3
    Feb 6, 2012 at 20:43
  • I'm not pro again but this would be the steps I would take to troubleshoot, this is very basic stuff iirc - you can check here to learn more about mod_sec and much more - cyberciti.biz/faq/… CyberCiti is a great resource, the main site for mod_sec logging is here - modsecurity.org/documentation/modsecurity-apache/1.9.3/…
    – g3nu1n3
    Feb 6, 2012 at 20:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .