diff options
author | Julien Dessaux | 2017-09-19 17:55:40 +0200 |
---|---|---|
committer | Julien Dessaux | 2017-09-21 16:21:41 +0200 |
commit | 142820653f8d6a3fffacc9acde09ca74e22892bf (patch) | |
tree | 3518ffe3ca11318cd70b88c6ab8ff26b79ea45f1 /templates/nginx | |
parent | Fixed docker permissions for user julien (diff) | |
download | masterfiles-142820653f8d6a3fffacc9acde09ca74e22892bf.tar.gz masterfiles-142820653f8d6a3fffacc9acde09ca74e22892bf.tar.bz2 masterfiles-142820653f8d6a3fffacc9acde09ca74e22892bf.zip |
Finished adding nagios policy along with simple nginx policy
Diffstat (limited to 'templates/nginx')
-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; + } + } +} |