This commit is contained in:
Vaica committed 2026-06-22 13:30:55 +08:00
1 parent f172e6c15b
commit ad47a6dddd
2 files changed
+19 -1

No files matched your search

+1 -1
View File
@@ -12,7 +12,6 @@ services:
restart: unless-stopped restart: unless-stopped
ports: ports:
- "8016:8016" - "8016:8016"
- "1313:1313"
volumes: volumes:
# Hugo 博客目录(必须)- 映射宿主机博客根目录到容器内 /blog # Hugo 博客目录(必须)- 映射宿主机博客根目录到容器内 /blog
- ..:/blog - ..:/blog
@@ -54,6 +53,7 @@ services:
ports: ports:
- "80:80" - "80:80"
- "443:443" - "443:443"
- "1313:1313"
volumes: volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro - ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./nginx/conf.d:/etc/nginx/conf.d:ro - ./nginx/conf.d:/etc/nginx/conf.d:ro
@@ -0,0 +1,18 @@
# Hugo 预览 HTTPS 代理
server {
listen 1313 ssl http2;
server_name post.usj.cc;
ssl_certificate /etc/nginx/ssl/fullchain.pem;
ssl_certificate_key /etc/nginx/ssl/privkey.pem;
ssl_protocols TLSv1.2 TLSv1.3;
access_log off;
location / {
proxy_pass http://write-server:1313;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}