簡體   English   中英

Icinga + Nginx配置

[英]Icinga+Nginx configuration

我安裝了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;
}
}

我遇到了同樣的問題。 我必須輸入以下內容:

security.limit_extensions = .php .php5 .cgi 

進入php-fpm池配置文件。

當然,在輸入之后,我現在得到以下行錯誤:

Parse error: syntax error, unexpected '<' in /usr/local/icinga/sbin/tac.cgi on line 313

但是,進步!

數年后遇到幾乎相同的問題,遲到總比沒有好。 (我用“%”標記了必須設置的變量)

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;
}

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM