Icinga+Nginx 配置
我安装了 Icinga 1.6.0beta 并尝试使用此 手册安装它的新 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;
}
}
I installed Icinga 1.6.0beta and tried to install it's new web interface using this manual. But it was written for Apache. So I used the following configuration file for nginx to run the interface, but no success. I get directory listing denied in error logs. Any help?
Note: /data/developers/icinga-web symlinked to /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;
}
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
几年后遇到了几乎同样的问题,迟到总比不好。 (我用“%”标记了你必须自己设置的变量)
Ran into almost the same problems years later, better late than never. (I marked the variables you have to set yourself with " % ")
我遇到了同样的问题。我必须将以下行:
放入 php-fpm 池配置文件中。
当然,在我输入之后,我现在收到以下行错误:
但是嘿,进展!
I ran into the same problem. I had to put the following line:
Into the php-fpm pool configuration file.
Of course, after I put that, I now get the following line error:
But hey, progress!