我使用mod_proxy_fcgi为php-fpm创建了php请求,并使用Apache 2.4为nagios
设置了虚拟主机。虚拟主机中未显示的本地资源(images/js/css)
不知道是不是ProxyPassMatch
这是使所有的本地资源,包括图像,当我去200.000.00:22222/nagios/index.php
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>