Created
October 26, 2012 15:02
-
-
Save kazu634/3959283 to your computer and use it in GitHub Desktop.
This file contains 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 _; | |
access_log /var/log/nginx/nagios.kazu634.com.access.log; | |
error_log /var/log/nginx/nagios.kazu634.com.error.log; | |
auth_basic "Restricted Area"; | |
auth_basic_user_file /etc/nagios/htpasswd.users; | |
root /var/www; | |
index index.php index.html; | |
location / { | |
try_files $uri $uri/ index.php; | |
} | |
location /nagios { | |
alias /opt/nagios/share/; | |
} | |
location ~ ^/nagios/(.*\.php)$ { | |
alias /opt/nagios/share/$1; | |
include /etc/nginx/fastcgi_params; | |
fastcgi_pass unix:/var/run/php5-fpm.sock; | |
} | |
location ~ \.cgi$ { | |
root /opt/nagios/sbin/; | |
rewrite ^/nagios/cgi-bin/(.*)\.cgi /$1.cgi break; | |
fastcgi_param AUTH_USER $remote_user; | |
fastcgi_param REMOTE_USER $remote_user; | |
include /etc/nginx/fastcgi_params; | |
fastcgi_pass unix:/var/run/fcgiwrap.socket; | |
} | |
location ~ \.php$ { | |
include /etc/nginx/fastcgi_params; | |
fastcgi_pass unix:/var/run/php5-fpm.sock; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment