diff options
author | Holger Weiss <holger@zedat.fu-berlin.de> | 2025-01-01 02:16:24 +0100 |
---|---|---|
committer | Holger Weiss <holger@zedat.fu-berlin.de> | 2025-01-01 11:41:11 +0100 |
commit | 78c2d2c599bc358446cd5deb667f6e78e77b8024 (patch) | |
tree | cbe42be89bcbb12f140e92b7dc8e9de2da4c7459 /etc/nginx.conf | |
parent | 34bf5a14ee43d673e075b4de545f20d3e2aeb72a (diff) | |
download | site-78c2d2c599bc358446cd5deb667f6e78e77b8024.tar.gz |
Update Nginx configuration
Diffstat (limited to 'etc/nginx.conf')
-rw-r--r-- | etc/nginx.conf | 48 |
1 files changed, 39 insertions, 9 deletions
diff --git a/etc/nginx.conf b/etc/nginx.conf index ee815d3..1a6687f 100644 --- a/etc/nginx.conf +++ b/etc/nginx.conf | |||
@@ -19,10 +19,12 @@ ssl_dhparam /home/plugins/etc/ssl/dh-parameters.pem; | |||
19 | # Server definition for <https://www.monitoring-plugins.org/>. | 19 | # Server definition for <https://www.monitoring-plugins.org/>. |
20 | # | 20 | # |
21 | server { | 21 | server { |
22 | listen 130.133.8.40:443 ssl; | 22 | listen 130.133.8.40:443 ssl http2; |
23 | listen 130.133.8.40:444 ssl; | 23 | listen 130.133.8.40:444 ssl http2; |
24 | server_name www.monitoring-plugins.org; | 24 | server_name monitoring-plugins.org www.monitoring-plugins.org; |
25 | root /home/plugins/web/port-$server_port; | 25 | root /home/plugins/web/port-$server_port; |
26 | ssl_certificate /home/plugins/etc/ssl/monitoring-plugins.crt; | ||
27 | ssl_certificate_key /home/plugins/etc/ssl/monitoring-plugins.key; | ||
26 | 28 | ||
27 | # | 29 | # |
28 | # Downloads and attachments. | 30 | # Downloads and attachments. |
@@ -34,7 +36,10 @@ server { | |||
34 | } | 36 | } |
35 | root /home/plugins/web; | 37 | root /home/plugins/web; |
36 | fancyindex on; | 38 | fancyindex on; |
39 | fancyindex_default_sort date_desc; | ||
40 | fancyindex_name_length 40; | ||
37 | fancyindex_exact_size off; | 41 | fancyindex_exact_size off; |
42 | fancyindex_time_format "%F"; | ||
38 | fancyindex_css_href /resources/plugins.css; | 43 | fancyindex_css_href /resources/plugins.css; |
39 | fancyindex_ignore ^timestamp$; | 44 | fancyindex_ignore ^timestamp$; |
40 | } | 45 | } |
@@ -78,6 +83,15 @@ server { | |||
78 | } | 83 | } |
79 | 84 | ||
80 | # | 85 | # |
86 | # Rspamd. | ||
87 | # | ||
88 | location /rspamd/ { | ||
89 | proxy_pass http://127.0.0.1:11334/; | ||
90 | proxy_set_header Host $host; | ||
91 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
92 | } | ||
93 | |||
94 | # | ||
81 | # Redirects etc. | 95 | # Redirects etc. |
82 | # | 96 | # |
83 | location = /favicon.ico { | 97 | location = /favicon.ico { |
@@ -119,20 +133,36 @@ server { | |||
119 | } | 133 | } |
120 | 134 | ||
121 | # | 135 | # |
122 | # Redirect HTTP and all other domains to <https://www.monitoring-plugins.org/>. | 136 | # Redirect HTTP to <https://www.monitoring-plugins.org/>. Ditto for the test |
123 | # Ditto for the test instance. | 137 | # instance. |
138 | # | ||
139 | server { | ||
140 | listen 130.133.8.40:80; | ||
141 | server_name monitoring-plugins.org www.monitoring-plugins.org; | ||
142 | return 301 https://www.monitoring-plugins.org$request_uri; | ||
143 | } | ||
144 | |||
145 | server { | ||
146 | listen 130.133.8.40:81; | ||
147 | server_name monitoring-plugins.org www.monitoring-plugins.org; | ||
148 | return 301 https://www.monitoring-plugins.org:444$request_uri; | ||
149 | } | ||
150 | |||
151 | # | ||
152 | # Outdated domains. Can be deleted in 2026. | ||
124 | # | 153 | # |
125 | server { | 154 | server { |
126 | listen 130.133.8.40:80 default_server; | 155 | listen 130.133.8.40:80 default_server; |
127 | listen 130.133.8.40:443 default_server ssl; | 156 | listen 130.133.8.40:443 default_server ssl http2; |
157 | root /home/plugins/web-redirect; | ||
128 | ssl_certificate /home/plugins/etc/ssl/monitoring-plugins.crt; | 158 | ssl_certificate /home/plugins/etc/ssl/monitoring-plugins.crt; |
129 | ssl_certificate_key /home/plugins/etc/ssl/monitoring-plugins.key; | 159 | ssl_certificate_key /home/plugins/etc/ssl/monitoring-plugins.key; |
130 | return 301 https://www.monitoring-plugins.org$request_uri; | ||
131 | } | 160 | } |
161 | |||
132 | server { | 162 | server { |
133 | listen 130.133.8.40:81 default_server; | 163 | listen 130.133.8.40:81 default_server; |
134 | listen 130.133.8.40:444 default_server ssl; | 164 | listen 130.133.8.40:444 default_server ssl http2; |
165 | root /home/plugins/web-redirect; | ||
135 | ssl_certificate /home/plugins/etc/ssl/monitoring-plugins.crt; | 166 | ssl_certificate /home/plugins/etc/ssl/monitoring-plugins.crt; |
136 | ssl_certificate_key /home/plugins/etc/ssl/monitoring-plugins.key; | 167 | ssl_certificate_key /home/plugins/etc/ssl/monitoring-plugins.key; |
137 | return 301 https://www.monitoring-plugins.org:444$request_uri; | ||
138 | } | 168 | } |