diff options
Diffstat (limited to '')
-rw-r--r-- | templates/nginx/nagios_htpasswd | 1 | ||||
-rw-r--r-- | templates/nginx/nagios_nginx.conf | 59 |
2 files changed, 60 insertions, 0 deletions
diff --git a/templates/nginx/nagios_htpasswd b/templates/nginx/nagios_htpasswd new file mode 100644 index 0000000..31e01ed --- /dev/null +++ b/templates/nginx/nagios_htpasswd @@ -0,0 +1 @@ +julien:GrLHcALouSXmY diff --git a/templates/nginx/nagios_nginx.conf b/templates/nginx/nagios_nginx.conf new file mode 100644 index 0000000..10a4be3 --- /dev/null +++ b/templates/nginx/nagios_nginx.conf @@ -0,0 +1,59 @@ +worker_processes 1; + +# This default error log path is compiled-in to make sure configuration parsing +# errors are logged somewhere, especially during unattended boot when stderr +# isn't normally logged anywhere. This path will be touched on every nginx +# start regardless of error log location configured here. See +# https://trac.nginx.org/nginx/ticket/147 for more info. +# +#error_log /var/log/nginx/error.log; + +events { + worker_connections 1024; +} + +http { + include mime.types; + default_type application/octet-stream; + + sendfile on; + keepalive_timeout 65; + gzip on; + + server { + listen 80; + server_name localhost; + + root /usr/local/www/nagios/; + auth_basic "Restricted"; + auth_basic_user_file /usr/local/etc/nginx/htpasswd; + + location / { + index index.php; + try_files $uri $uri/ index.php; + } + + #error_page 404 /404.html; + + # redirect server error pages to the static page /50x.html + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root /usr/local/www/nginx-dist; + } + location ~ \.php$ { + fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock; + fastcgi_index index.php; + fastcgi_split_path_info ^(.+\.php)(/.+)$; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include fastcgi_params; + fastcgi_pass_header Authorization; + } + + location ~ \.cgi$ { + include fastcgi_params; + fastcgi_pass unix:/var/run/fcgiwrap/fcgiwrap.sock; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_param REMOTE_USER $remote_user; + } + } +} |