blob: 1a6687f24256351b17a16dddddc887182315a7d9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
|
#
# Nginx server configuration for the Monitoring Plugins.
#
# See:
# /usr/share/doc/nginx-doc/examples
#
# http://wiki.nginx.org/Pitfalls
# http://wiki.nginx.org/QuickStart
# http://wiki.nginx.org/Configuration
#
#
# TLS configuration.
#
ssl_ciphers HIGH:!aNULL:!MD5:!3DES:!SSLv2:@STRENGTH;
ssl_dhparam /home/plugins/etc/ssl/dh-parameters.pem;
#
# Server definition for <https://www.monitoring-plugins.org/>.
#
server {
listen 130.133.8.40:443 ssl http2;
listen 130.133.8.40:444 ssl http2;
server_name monitoring-plugins.org www.monitoring-plugins.org;
root /home/plugins/web/port-$server_port;
ssl_certificate /home/plugins/etc/ssl/monitoring-plugins.crt;
ssl_certificate_key /home/plugins/etc/ssl/monitoring-plugins.key;
#
# Downloads and attachments.
#
location ^~ /download/ {
if ($args = $is_args) {
# Fancy Index: Sort by modification time (descending).
rewrite ^(.*/)$ $1?C=M&O=D last;
}
root /home/plugins/web;
fancyindex on;
fancyindex_default_sort date_desc;
fancyindex_name_length 40;
fancyindex_exact_size off;
fancyindex_time_format "%F";
fancyindex_css_href /resources/plugins.css;
fancyindex_ignore ^timestamp$;
}
location ^~ /attachments/ {
root /home/plugins/web;
}
#
# Make Mailman archives available for Gmane TEMPORARILY.
#
location ^~ /mbox/ {
root /home/plugins/tmp/;
fancyindex on;
fancyindex_exact_size off;
fancyindex_css_href /resources/plugins.css;
}
#
# Mailman and cgit.
#
location ^~ /cgit {
root /home/git/opt/cgit/web;
}
location ^~ /archive/ {
alias /home/mailman/server/archives/public/;
}
location ^~ /list/icons/ {
alias /home/mailman/server/icons/;
}
location ~ ^/list(?:/listinfo)?/?$ {
return 301 /support.html;
}
location ~ ^/(?:list/|repositories) {
root /home/plugins/web/cgi-bin;
fastcgi_split_path_info ^(/list/[^/]+|/repositories)(.*)$;
fastcgi_pass unix:/var/run/fcgiwrap.socket;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
include /etc/nginx/fastcgi_params;
gzip off; # Scripts have to complete before getting gzipped.
}
#
# Rspamd.
#
location /rspamd/ {
proxy_pass http://127.0.0.1:11334/;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
#
# Redirects etc.
#
location = /favicon.ico {
root /home/plugins/web/site/resources;
}
location = /doc/release-notes/1-5.html {
return 301 /news/release-1-5.html;
}
location = /download/snapshot/monitoring-plugins-HEAD.tar.gz {
return 301 /download/snapshot/monitoring-plugins-master.tar.gz;
}
location = /rfc/new_threshold_syntax {
return 301 /doc/new-threshold-syntax.html;
}
location = /taxonomy/term/2 {
return 301 /doc/writing-perl-plugins.html;
}
location ^~ /snapshot {
return 301 /download$request_uri;
}
location ~ ^/(?:man.*|guidelines|extra-opts)$ {
return 301 /doc$request_uri.html;
}
}
#
# Our plugins/t/check_http.t checks <http://test.monitoring-plugins.org/>.
#
server {
listen 130.133.8.40:80;
server_name test.monitoring-plugins.org;
root /home/plugins/web/site;
location ~ ^/(?:index.html)?$ {
# Serve index.html.
}
location / {
return 301 https://www.monitoring-plugins.org$request_uri;
}
}
#
# Redirect HTTP to <https://www.monitoring-plugins.org/>. Ditto for the test
# instance.
#
server {
listen 130.133.8.40:80;
server_name monitoring-plugins.org www.monitoring-plugins.org;
return 301 https://www.monitoring-plugins.org$request_uri;
}
server {
listen 130.133.8.40:81;
server_name monitoring-plugins.org www.monitoring-plugins.org;
return 301 https://www.monitoring-plugins.org:444$request_uri;
}
#
# Outdated domains. Can be deleted in 2026.
#
server {
listen 130.133.8.40:80 default_server;
listen 130.133.8.40:443 default_server ssl http2;
root /home/plugins/web-redirect;
ssl_certificate /home/plugins/etc/ssl/monitoring-plugins.crt;
ssl_certificate_key /home/plugins/etc/ssl/monitoring-plugins.key;
}
server {
listen 130.133.8.40:81 default_server;
listen 130.133.8.40:444 default_server ssl http2;
root /home/plugins/web-redirect;
ssl_certificate /home/plugins/etc/ssl/monitoring-plugins.crt;
ssl_certificate_key /home/plugins/etc/ssl/monitoring-plugins.key;
}
|