我安装了Icinga1.6.0测试版,并尝试使用这个manual安装新的web界面。但它是为Apache编写的。所以我使用了下面的nginx配置文件来运行这个接口,但是没有成功。我在错误日志中看到目录列表被拒绝。有什么帮助吗?
注意: /data/developers/icinga-web符号链接到/usr/local/icinga-web
server {
server_name developers.example.com;
access_log /var/log/nginx/dev.access.log;
error_log /var/log/nginx/dev.error.log;
root /data/developers;
location / {
index index.html index.htm index.php;
}
location /icinga-web/js/ext3/ {
alias /usr/local/icinga-web/lib/ext3/;
}
location /icinga-web/ {
if (!-e $request_filename) {
rewrite ^(/icinga-web)(/.*)$ /icinga-web/index.php?$2 last;
}
}
try_files $uri $uri/ /icinga-web/index.php?$args;
location ~ \.php$ {
include /etc/nginx/fastcgi_params;
fastcgi_split_path_info ^(/icinga-web)(/.*)$;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
}
}发布于 2012-11-16 11:12:28
我遇到了同样的问题。我不得不写下下面这行:
security.limit_extensions = .php .php5 .cgi 到php-fpm池配置文件中。
当然,在我把它放进去之后,我现在得到了下面的行错误:
Parse error: syntax error, unexpected '<' in /usr/local/icinga/sbin/tac.cgi on line 313但是,嘿,进步了!
发布于 2018-10-11 21:07:25
几年后遇到了几乎同样的问题,迟到总比不到好。(我用“%”标记了你必须自己设置的变量)
location @icinga {
include fastcgi.conf;
fastcgi_temp_path fastcgi;
fastcgi_pass %YOUR_SOCKET%;
fastcgi_param SCRIPT_NAME /icingaweb2/index.php;
fastcgi_param SCRIPT_FILENAME %ICINGA_WEB_LOCATION%/index.php;
fastcgi_param ICINGAWEB_CONFIGDIR %ICINGA_CONFIG_DIR%;
}
location /icingaweb2 {
alias %ICINGA_WEB_LOCATION%/public;
try_files $uri @icinga;
}https://stackoverflow.com/questions/8278912
复制相似问题