Created
November 28, 2012 09:03
-
-
Save cocoy/4160023 to your computer and use it in GitHub Desktop.
nagios_nginx config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
server_name localhost; | |
listen 80; | |
auth_basic "Restricted Area"; | |
auth_basic_user_file /etc/nagios3/htpasswd.users; | |
root /usr/share/nagios3/htdocs; | |
index index.php index.html; | |
location / { | |
try_files $uri $uri/ index.php; | |
} | |
location /nagios3 { | |
alias /usr/share/nagios3/htdocs; | |
} | |
location /stylesheets { | |
alias /etc/nagios3/stylesheets; | |
} | |
location /nagios3/stylesheets { | |
alias /etc/nagios3/stylesheets; | |
} | |
location ~ \.cgi$ { | |
root /usr/lib/cgi-bin/nagios3; | |
rewrite ^/cgi-bin/nagios3/(.*)$ /$1; | |
include /etc/nginx/fastcgi_params; | |
fastcgi_param AUTH_USER $remote_user; | |
fastcgi_param REMOTE_USER $remote_user; | |
fastcgi_param SCRIPT_FILENAME /usr/lib/cgi-bin/nagios3$fastcgi_script_name; | |
#fastcgi_pass fcgiwrap; | |
fastcgi_pass unix:/var/run/fcgiwrap.socket; | |
} | |
location ~ \.php$ { | |
include /etc/nginx/fastcgi_params; | |
#fastcgi_pass unix:/var/run/php5-fpm.sock; | |
fastcgi_pass 127.0.0.1:9000; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment