Trace: nagios_nginx

Nagios Nginx

Note: Disable rewrite for Dokuwiki…

    location ^~ /nagios {
        auth_basic "Restricted";
        auth_basic_user_file /usr/local/nagios/share/.htpasswd;
        add_header X-Frame-Options "ALLOW";

        alias /usr/local/nagios/share;
        index index.php;
        location ~ \.php$ {
            try_files       $uri = 404;
            fastcgi_index index.php;
            fastcgi_param SCRIPT_FILENAME $request_filename;
            fastcgi_pass unix:/var/run/php/php-fpm.sock;
            include fastcgi_params;
        }
        location ~ \.cgi$ {
            try_files $uri =404;
            root /usr/local/nagios/sbin;
            rewrite ^/nagios/cgi-bin/(.*)\.cgi /$1.cgi break;
            fastcgi_param   AUTH_USER $remote_user;
            fastcgi_param   REMOTE_USER $remote_user;
            fastcgi_pass unix:/var/run/fcgiwrap.socket;
            include fastcgi_params;
        }
    }

References

nagios_nginx.txt · Last modified: 2024/06/23 21:38
Public Domain Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain