summaryrefslogtreecommitdiffstats
path: root/etc/nginx
diff options
context:
space:
mode:
authorHolger Weiss <holger@zedat.fu-berlin.de>2013-09-29 22:03:24 (GMT)
committerHolger Weiss <holger@zedat.fu-berlin.de>2013-09-29 22:03:24 (GMT)
commit0b6423f9c99d9edf8c96fefd0f6c453859395aa1 (patch)
tree1c2b6b21704a294940f87c7892676998d8371707 /etc/nginx
downloadsite-0b6423f9c99d9edf8c96fefd0f6c453859395aa1.tar.gz
Import Nagios Plugins site
Import the Nagios Plugins web site, Cronjobs, infrastructure scripts, and configuration files.
Diffstat (limited to 'etc/nginx')
-rw-r--r--etc/nginx/site.conf76
-rw-r--r--etc/nginx/ssl.conf6
2 files changed, 82 insertions, 0 deletions
diff --git a/etc/nginx/site.conf b/etc/nginx/site.conf
new file mode 100644
index 0000000..8d56aeb
--- /dev/null
+++ b/etc/nginx/site.conf
@@ -0,0 +1,76 @@
1#
2# Nginx server configuration for the Nagios Plugins.
3#
4# See:
5# /usr/share/doc/nginx-doc/examples
6#
7# http://wiki.nginx.org/Pitfalls
8# http://wiki.nginx.org/QuickStart
9# http://wiki.nginx.org/Configuration
10#
11
12#
13# Server definition for <https://www.nagios-plugins.org/>.
14#
15server {
16 listen 443 ssl;
17 server_name www.nagios-plugins.org;
18 root /home/plugins/web/site;
19
20 #
21 # Downloads and attachments.
22 #
23 location ^~ /attachments/ {
24 root /home/plugins/web;
25 }
26 location ^~ /download/ {
27 root /home/plugins/web;
28 fancyindex on;
29 fancyindex_exact_size off;
30 fancyindex_css_href /media/plugins.css;
31 }
32
33 #
34 # Mailman and cgit.
35 #
36 location ^~ /cgit {
37 root /home/git/opt/cgit/web;
38 }
39 location ^~ /list/icons/ {
40 alias /home/mailman/server/icons/;
41 }
42 location ~ ^/list/?$ {
43 return 301 /list/listinfo;
44 }
45 location ~ ^/(?:list/|repositories) {
46 root /home/plugins/web/cgi-bin;
47 fastcgi_split_path_info ^(/list/[^/]+|/repositories)(.*)$;
48 fastcgi_pass unix:/var/run/fcgiwrap.socket;
49 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
50 fastcgi_param PATH_INFO $fastcgi_path_info;
51 include /etc/nginx/fastcgi_params;
52 gzip off; # Scripts have to complete before getting gzipped.
53 }
54
55 #
56 # Redirects etc.
57 #
58 location = /favicon.ico {
59 root /home/plugins/web/site/media;
60 }
61 location ^~ /snapshot {
62 return 301 /download$request_uri;
63 }
64 location ~ ^/(?:man|guidelines$) {
65 return 301 /doc$request_uri.html;
66 }
67}
68
69#
70# Redirect HTTP and all other domains to <https://www.nagios-plugins.org/>.
71#
72server {
73 listen 80 default_server;
74 listen 443 default_server ssl;
75 return 301 https://www.nagios-plugins.org$request_uri;
76}
diff --git a/etc/nginx/ssl.conf b/etc/nginx/ssl.conf
new file mode 100644
index 0000000..04f029a
--- /dev/null
+++ b/etc/nginx/ssl.conf
@@ -0,0 +1,6 @@
1#
2# Nginx SSL configuration for the Nagios Plugins.
3#
4ssl_certificate /home/plugins/etc/ssl/nagios-plugins.crt;
5ssl_certificate_key /home/plugins/etc/ssl/nagios-plugins.key;
6ssl_session_cache shared:SSL:10m;