From 1908d79444e26f58a8ff09793ea66bfc0638dbed Mon Sep 17 00:00:00 2001 From: wdh <243823965@qq.com> Date: Tue, 19 May 2026 10:20:30 +0800 Subject: [PATCH] 2 --- conf/conf.d/gitea.sggai.site.conf | 25 +++++++++++++++++++++++++ conf/conf.d/proxy.sggai.site.conf | 25 +++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 conf/conf.d/gitea.sggai.site.conf create mode 100644 conf/conf.d/proxy.sggai.site.conf diff --git a/conf/conf.d/gitea.sggai.site.conf b/conf/conf.d/gitea.sggai.site.conf new file mode 100644 index 0000000..ebc1886 --- /dev/null +++ b/conf/conf.d/gitea.sggai.site.conf @@ -0,0 +1,25 @@ +server { + listen 80; + listen 443 ssl; + server_name gitea.sggai.site; + + ssl_certificate /etc/letsencrypt/live/gitea.sggai.site/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/gitea.sggai.site/privkey.pem; + + root /var/www/gitea.sggai.site; + index index.html; + + location ^~ /.well-known/acme-challenge/ { + root /var/www; + default_type text/plain; + try_files $uri =404; + } + + location / { + if ($scheme = http) { + return 301 https://$host$request_uri; + } + + try_files $uri $uri/ /index.html; + } +} diff --git a/conf/conf.d/proxy.sggai.site.conf b/conf/conf.d/proxy.sggai.site.conf new file mode 100644 index 0000000..43372ff --- /dev/null +++ b/conf/conf.d/proxy.sggai.site.conf @@ -0,0 +1,25 @@ +server { + listen 80; + listen 443 ssl; + server_name proxy.sggai.site; + + ssl_certificate /etc/letsencrypt/live/proxy.sggai.site/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/proxy.sggai.site/privkey.pem; + + root /var/www/proxy.sggai.site; + index index.html; + + location ^~ /.well-known/acme-challenge/ { + root /var/www; + default_type text/plain; + try_files $uri =404; + } + + location / { + if ($scheme = http) { + return 301 https://$host$request_uri; + } + + try_files $uri $uri/ /index.html; + } +}