nginx 初始配置

This commit is contained in:
2026-05-03 18:58:11 +00:00
commit f62e50b057
22 changed files with 153 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
server {
server_name git.140103.xyz;
location / {
proxy_pass http://127.0.0.1:3001;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/git.140103.xyz/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/git.140103.xyz/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = git.140103.xyz) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
server_name git.140103.xyz;
return 404; # managed by Certbot
}