【发布时间】:2016-04-26 13:13:34
【问题描述】:
我正在使用 Apache 2.4 为 nagios 设置一个虚拟主机,使用 mod_proxy_fcgi 将 php 请求转发到 php-fpm。
我想知道当我转到200.000.00:22222/nagios/index.php 时,是否是ProxyPassMatch 导致所有本地资源(包括图像、js、css)都无法加载。
所有资源都被解释为Content-Type:text/html; charset=iso-8859-1,如响应标头中所示。它们显示403 Forbidden error,并在错误日志中显示AH01630: client denied by server configuration。
/etc/httpd/conf.d/nagio.conf:
Listen 22222
<VirtualHost *:22222>
ServerName {IP}:22222
AddType image/jpeg jpeg jpg jpe
ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin"
DocumentRoot "/usr/local/nagios"
<Directory "/usr/local/nagios/sbin">
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
AllowOverride None
Require all granted
</Directory>
<LocationMatch "/nagios/((.*\.php)(/.*)?)$">
ProxyPassMatch "fcgi://localhost:9000/usr/local/nagios/share/$1"
</LocationMatch>
<Directory "/usr/local/nagios/share">
Options None
AllowOverride None
Require all granted
</Directory>
</VirtualHost>
【问题讨论】:
标签: apache apache2 virtualhost httpd.conf nagios