From e18c2731c6c345326aeb7c7f74653426468ab2b6 Mon Sep 17 00:00:00 2001 From: Xiao Pan Date: Thu, 10 Jul 2025 11:33:57 +0000 Subject: nginx use cert in /etc/postfix, add mail.flylightning.xyz domain nginx use cert in /etc/postfix so acme.sh only need to install to one location for both nginx and postfix to use. nginx add mail.flylightning.xyz domain for acme.sh to use to renew it, without it acme.sh will error when renew it --- etc/nginx/nginx.conf | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'etc/nginx/nginx.conf') diff --git a/etc/nginx/nginx.conf b/etc/nginx/nginx.conf index a837cf54..dddc94a8 100644 --- a/etc/nginx/nginx.conf +++ b/etc/nginx/nginx.conf @@ -50,8 +50,8 @@ http { listen [::]:443 ssl; server_name flylightning.xyz; - ssl_certificate /etc/nginx/flylightning.pem; - ssl_certificate_key /etc/nginx/flylightning.key; + ssl_certificate /etc/postfix/flylightning.pem; + ssl_certificate_key /etc/postfix/flylightning.key; #charset koi8-r; @@ -138,8 +138,8 @@ http { listen [::]:443 ssl; server_name mirrors.flylightning.xyz; - ssl_certificate /etc/nginx/flylightning.pem; - ssl_certificate_key /etc/nginx/flylightning.key; + ssl_certificate /etc/postfix/flylightning.pem; + ssl_certificate_key /etc/postfix/flylightning.key; location / { root /srv/http/mirrors; @@ -160,8 +160,8 @@ http { server_name git.flylightning.xyz; root /usr/share/webapps/cgit; - ssl_certificate /etc/nginx/flylightning.pem; - ssl_certificate_key /etc/nginx/flylightning.key; + ssl_certificate /etc/postfix/flylightning.pem; + ssl_certificate_key /etc/postfix/flylightning.key; # about nginx location regex: # - https://nginx.org/en/docs/http/ngx_http_core_module.html#location @@ -185,6 +185,12 @@ http { } } + # needed for acme.sh to renew mail.flylightning.xyz + server { + listen 80; + listen [::]:80; + server_name mail.flylightning.xyz; + } } # vim: expandtab -- cgit v1.2.3-70-g09d2