summaryrefslogtreecommitdiffstats
path: root/etc/nginx/site.conf
diff options
context:
space:
mode:
authorHolger Weiss <holger@zedat.fu-berlin.de>2013-10-19 23:10:05 (GMT)
committerHolger Weiss <holger@zedat.fu-berlin.de>2013-10-19 23:10:05 (GMT)
commit36a15b629005b293123043882e8b2c970a99f8b7 (patch)
treea3bea17d34a871059543fd90b758ab12aa4d7be0 /etc/nginx/site.conf
parentb3df8803c99104aedb24970841c4c8e8bd7ed99f (diff)
downloadsite-36a15b629005b293123043882e8b2c970a99f8b7.tar.gz
Let Nginx listen on specific IP address
Let Nginx listen on 130.133.8.40 instead of 0.0.0.0, and allow for serving additional SSL domains.
Diffstat (limited to 'etc/nginx/site.conf')
-rw-r--r--etc/nginx/site.conf92
1 files changed, 0 insertions, 92 deletions
diff --git a/etc/nginx/site.conf b/etc/nginx/site.conf
deleted file mode 100644
index 9e94bf6..0000000
--- a/etc/nginx/site.conf
+++ /dev/null
@@ -1,92 +0,0 @@
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 listen 444 ssl;
18 server_name www.nagios-plugins.org;
19 root /home/plugins/web/port-$server_port;
20
21 #
22 # Downloads and attachments.
23 #
24 location ^~ /attachments/ {
25 root /home/plugins/web;
26 }
27 location ^~ /download/ {
28 root /home/plugins/web;
29 fancyindex on;
30 fancyindex_exact_size off;
31 fancyindex_css_href /resources/plugins.css;
32 }
33
34 #
35 # Mailman and cgit.
36 #
37 location ^~ /cgit {
38 root /home/git/opt/cgit/web;
39 }
40 location ^~ /list/icons/ {
41 alias /home/mailman/server/icons/;
42 }
43 location ~ ^/list/?$ {
44 return 301 /list/listinfo;
45 }
46 location ~ ^/(?:list/|repositories) {
47 root /home/plugins/web/cgi-bin;
48 fastcgi_split_path_info ^(/list/[^/]+|/repositories)(.*)$;
49 fastcgi_pass unix:/var/run/fcgiwrap.socket;
50 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
51 fastcgi_param PATH_INFO $fastcgi_path_info;
52 include /etc/nginx/fastcgi_params;
53 gzip off; # Scripts have to complete before getting gzipped.
54 }
55
56 #
57 # Redirects etc.
58 #
59 location = /favicon.ico {
60 root /home/plugins/web/site/resources;
61 }
62 location = /doc/release-notes/1-5.html {
63 return 301 /news/release-1-5.html;
64 }
65 location = /download/snapshot/nagios-plugins-HEAD.tar.gz {
66 return 301 /download/snapshot/nagios-plugins-master.tar.gz;
67 }
68 location = /taxonomy/term/2 {
69 return 301 /doc/presentation.html;
70 }
71 location ^~ /snapshot {
72 return 301 /download$request_uri;
73 }
74 location ~ ^/(?:man.*|guidelines|extra-opts)$ {
75 return 301 /doc$request_uri.html;
76 }
77}
78
79#
80# Redirect HTTP and all other domains to <https://www.nagios-plugins.org/>.
81# Ditto for the test instance.
82#
83server {
84 listen 80 default_server;
85 listen 443 default_server ssl;
86 return 301 https://www.nagios-plugins.org$request_uri;
87}
88server {
89 listen 81 default_server;
90 listen 444 default_server ssl;
91 return 301 https://www.nagios-plugins.org:444$request_uri;
92}