|
|
@@ -1,19 +1,32 @@ |
|
|
# HTTP -> HTTPS 强制跳转 |
|
|
# HTTP -> HTTPS 强制跳转 |
|
|
server { |
|
|
server { |
|
|
listen 80; |
|
|
listen 80; |
|
|
server_name wk.aionline.cc; |
|
|
|
|
|
return 301 https://$host$request_uri; |
|
|
|
|
|
|
|
|
server_name cytx.csybhelp.com; |
|
|
|
|
|
# ACME HTTP-01 验证路径放行 |
|
|
|
|
|
location /.well-known/acme-challenge/ { |
|
|
|
|
|
root /home/acme-challenge; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
# HTTP 跳转 HTTPS |
|
|
|
|
|
location / { |
|
|
|
|
|
rewrite ^(.*)$ https://$server_name$1 permanent; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
# HTTPS |
|
|
# HTTPS |
|
|
server { |
|
|
server { |
|
|
listen 443 ssl; |
|
|
listen 443 ssl; |
|
|
http2 on; |
|
|
http2 on; |
|
|
server_name wk.aionline.cc; |
|
|
|
|
|
root /home/www/pap_web/www; |
|
|
|
|
|
|
|
|
server_name cytx.csybhelp.com; |
|
|
|
|
|
root /home/www/cytx_api; |
|
|
|
|
|
|
|
|
|
|
|
access_log /home/wwwlogs/cytx_api_access.log; |
|
|
|
|
|
error_log /home/wwwlogs/cytx_api_error.log; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ssl_certificate /etc/nginx/ssl/wk.aionline.cc.pem; |
|
|
|
|
|
ssl_certificate_key /etc/nginx/ssl/wk.aionline.cc.key; |
|
|
|
|
|
|
|
|
ssl_certificate cert/cytx_csybhelp_com_fullchain.pem; |
|
|
|
|
|
ssl_certificate_key cert/cytx_csybhelp_com_privkey.pem; |
|
|
ssl_protocols TLSv1.2 TLSv1.3; |
|
|
ssl_protocols TLSv1.2 TLSv1.3; |
|
|
ssl_ciphers HIGH:!aNULL:!MD5; |
|
|
ssl_ciphers HIGH:!aNULL:!MD5; |
|
|
|
|
|
|
|
|
@@ -22,14 +35,15 @@ server { |
|
|
index index.js index.html index.htm; |
|
|
index index.js index.html index.htm; |
|
|
|
|
|
|
|
|
# 静态资源直接返回,长缓存 |
|
|
# 静态资源直接返回,长缓存 |
|
|
location ~ /static/ { |
|
|
|
|
|
|
|
|
location /static/ { |
|
|
|
|
|
root /home/www/cytx_api/www; |
|
|
etag on; |
|
|
etag on; |
|
|
expires max; |
|
|
expires max; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
# 上传文件目录 |
|
|
# 上传文件目录 |
|
|
location /upload/ { |
|
|
location /upload/ { |
|
|
alias /home/www/pap_web/www/upload/; |
|
|
|
|
|
|
|
|
alias /home/www/cytx_api/www/upload/; |
|
|
etag on; |
|
|
etag on; |
|
|
expires 7d; |
|
|
expires 7d; |
|
|
} |
|
|
} |
|
|
|