| Index: modules/nagios/files/site.conf |
| =================================================================== |
| rename from modules/nagios/templates/site.erb |
| rename to modules/nagios/files/site.conf |
| --- a/modules/nagios/templates/site.erb |
| +++ b/modules/nagios/files/site.conf |
| @@ -1,64 +1,45 @@ |
| -server { |
| - listen 80; |
| - listen [::]:80; |
| - server_name '<%= vhost %>'; |
| +expires 31d; |
| - location / { |
| - rewrite (.*) https://<%= vhost %>$1 permanent; |
| - } |
| +root /usr/share/nagios3/htdocs; |
| +index index.php index.html; |
| + |
| +auth_basic "Nagios Restricted Access"; |
| +auth_basic_user_file /etc/nagios3/htpasswd.users; |
| + |
| +location /pnp4nagios { |
| + alias /usr/share/pnp4nagios/html; |
| } |
| -server { |
| - listen 443 ssl; |
| - listen [::]:443 ssl; |
| - ssl_certificate sites-available/adblockplus.org_sslcert.pem; |
| - ssl_certificate_key sites-available/adblockplus.org_sslcert.key; |
| +location ~ ^(/pnp4nagios.*\.php)(.*)$ { |
| + root /usr/share/pnp4nagios/html; |
| + include /etc/nginx/fastcgi_params; |
| + fastcgi_split_path_info ^(.+\.php)(.*)$; |
| + fastcgi_param PATH_INFO $fastcgi_path_info; |
| - server_name '<%= vhost %>'; |
| + fastcgi_param SCRIPT_FILENAME $document_root/index.php; |
| + fastcgi_pass unix:/tmp/php-fastcgi.sock; |
| +} |
| - expires 31d; |
| +location /stylesheets { |
| + alias /etc/nagios3/stylesheets; |
| +} |
| - root /usr/share/nagios3/htdocs; |
| - index index.php index.html; |
| +location ~ \.cgi$ { |
| + root /usr/lib/cgi-bin/nagios3; |
| - auth_basic "Nagios Restricted Access"; |
| - auth_basic_user_file /etc/nagios3/htpasswd.users; |
| + rewrite ^/cgi-bin/nagios3/(.*)$ /$1; |
| - location /pnp4nagios { |
| - alias /usr/share/pnp4nagios/html; |
| - } |
| + include /etc/nginx/fastcgi_params; |
| - location ~ ^(/pnp4nagios.*\.php)(.*)$ { |
| - root /usr/share/pnp4nagios/html; |
| - include /etc/nginx/fastcgi_params; |
| - fastcgi_split_path_info ^(.+\.php)(.*)$; |
| - fastcgi_param PATH_INFO $fastcgi_path_info; |
| + fastcgi_param AUTH_USER $remote_user; |
| + fastcgi_param REMOTE_USER $remote_user; |
| + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; |
| - fastcgi_param SCRIPT_FILENAME $document_root/index.php; |
| - fastcgi_pass unix:/tmp/php-fastcgi.sock; |
| - } |
| + fastcgi_pass unix:/var/run/fcgiwrap.socket; |
| +} |
| - location /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 $document_root$fastcgi_script_name; |
| - |
| - fastcgi_pass unix:/var/run/fcgiwrap.socket; |
| - } |
| - |
| - location ~ \.php$ { |
| - include /etc/nginx/fastcgi_params; |
| - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; |
| - fastcgi_pass unix:/tmp/php-fastcgi.sock; |
| - } |
| +location ~ \.php$ { |
| + include /etc/nginx/fastcgi_params; |
| + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; |
| + fastcgi_pass unix:/tmp/php-fastcgi.sock; |
| } |