Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: modules/nagios/files/site.conf

Issue 5734493784637440: Issue 245 - Unify SSL configuration for all servers (Closed)
Patch Set: Converted Nagios site configuration and centralized error page configuration Created April 10, 2014, 6:40 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « modules/filterserver/manifests/init.pp ('k') | modules/nagios/manifests/server.pp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « modules/filterserver/manifests/init.pp ('k') | modules/nagios/manifests/server.pp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld