From 789398185cc3ee376c8fe21e3cca93fdeb92d686 Mon Sep 17 00:00:00 2001 From: Matthew R Date: Fri, 18 Feb 2022 15:08:53 -0500 Subject: [PATCH] server block change --- .../lists-old.libraryofcode.org.conf | 34 +++++++++++++++++++ .../lists.libraryofcode.org.conf | 30 +++++----------- 2 files changed, 43 insertions(+), 21 deletions(-) create mode 100644 Nginx/Server Blocks/lists-old.libraryofcode.org.conf diff --git a/Nginx/Server Blocks/lists-old.libraryofcode.org.conf b/Nginx/Server Blocks/lists-old.libraryofcode.org.conf new file mode 100644 index 0000000..a823fa7 --- /dev/null +++ b/Nginx/Server Blocks/lists-old.libraryofcode.org.conf @@ -0,0 +1,34 @@ +server { + listen 443 ssl http2; + listen [::]:443 ssl http2; + server_name lists.libraryofcode.org; + + ssl_certificate /etc/nginx/ssl/org.chain.crt; + ssl_certificate_key /etc/nginx/ssl/org.key.pem; + + client_max_body_size 1G; + + location / { + return 307 $scheme://lists.libraryofcode.org/cgi-bin/mailman/listinfo; + } + + location /cgi-bin/mailman { + root /usr/lib/; + fastcgi_split_path_info (^/cgi-bin/mailman/[^/]*)(.*)$; + include /etc/nginx/fastcgi_params; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_param PATH_INFO $fastcgi_path_info; + fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; + fastcgi_intercept_errors on; + fastcgi_pass unix:/var/run/fcgiwrap.socket; + } + + location /images/mailman { + alias /usr/share/images/mailman; + } + + location /pipermail { + alias /var/lib/mailman/archives/public; + autoindex on; + } +} diff --git a/Nginx/Server Blocks/lists.libraryofcode.org.conf b/Nginx/Server Blocks/lists.libraryofcode.org.conf index a823fa7..91f180a 100644 --- a/Nginx/Server Blocks/lists.libraryofcode.org.conf +++ b/Nginx/Server Blocks/lists.libraryofcode.org.conf @@ -8,27 +8,15 @@ server { client_max_body_size 1G; + + location /static/ { + alias /etc/mailman3/static/; + } + location / { - return 307 $scheme://lists.libraryofcode.org/cgi-bin/mailman/listinfo; - } - - location /cgi-bin/mailman { - root /usr/lib/; - fastcgi_split_path_info (^/cgi-bin/mailman/[^/]*)(.*)$; - include /etc/nginx/fastcgi_params; - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - fastcgi_param PATH_INFO $fastcgi_path_info; - fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; - fastcgi_intercept_errors on; - fastcgi_pass unix:/var/run/fcgiwrap.socket; - } - - location /images/mailman { - alias /usr/share/images/mailman; - } - - location /pipermail { - alias /var/lib/mailman/archives/public; - autoindex on; + proxy_pass http://127.0.0.1:6475; + proxy_set_header Host $host; + proxy_set_header X-Forwarded-For $remote_addr; + } }