总是出现 403 Forbidden 错误

总是出现 403 Forbidden 错误

我在客户的服务器上收到 403 Forbidden 错误(其他人设置的)。我在 CentOS 上使用 Apache。由于其他人设置的服务器,而且服务器是 CentOS 而不是我习惯的 Ubuntu,所以我不知道如何解决这个问题。

关于如何解决这个问题有什么建议吗?

编辑:在日志中,我不断收到以下一系列通知/警告:

[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

编辑2:这是我的VirtualHost东西:

<VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot /var/www/html
</VirtualHost>

答案1

首先要做的是查看错误日志,它通常位于 中/var/log/httpd/error_log。如果错误日志不在其默认位置,则应查看可能包含指令的配置/etc/httpd/conf文件。/etc/httpd/conf.dErrorLog

答案2

访问该页面时收到的完整错误消息是什么?根据我的经验,这要么是权限问题,要么是 mod_sec(ModSecurity 模块)阻止了您,您需要将规则列入白名单,要么是您试图查看 Apache 配置为禁止目录列表的目录。我绝不是专业人士,但这是我的意见。

希望这可以帮助。

相关内容