From 78c2d2c599bc358446cd5deb667f6e78e77b8024 Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Wed, 1 Jan 2025 02:16:24 +0100 Subject: Update Nginx configuration --- etc/nginx.conf | 48 +++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 39 insertions(+), 9 deletions(-) (limited to 'etc/nginx.conf') 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; # Server definition for . # server { - listen 130.133.8.40:443 ssl; - listen 130.133.8.40:444 ssl; - server_name www.monitoring-plugins.org; + 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. @@ -34,7 +36,10 @@ server { } 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$; } @@ -77,6 +82,15 @@ server { 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. # @@ -119,20 +133,36 @@ server { } # -# Redirect HTTP and all other domains to . -# Ditto for the test instance. +# Redirect HTTP to . 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; + 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; - return 301 https://www.monitoring-plugins.org$request_uri; } + server { listen 130.133.8.40:81 default_server; - listen 130.133.8.40:444 default_server ssl; + 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; - return 301 https://www.monitoring-plugins.org:444$request_uri; } -- cgit v1.2.3-74-g34f1