HTTPS、重定向、静态文件、分流
1234567891011121314151617
upstream halo { server 127.0.0.1:8090;}server { listen 443 ssl; server_name chengs.run; ssl_certificate cert/chengs.run.crt; ssl_certificate_key cert/chengs.run.key; client_max_body_size 1024m; location / { proxy_pass http://halo; proxy_set_header HOST $host; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; }}
12345
server { listen 80; server_name *.chengs.run chengs.run; return 301 https://$host$request_uri;}
123456789
server{ listen 443 ssl; server_name note.chengs.run; ssl_certificate cert/note.chengs.run.crt; ssl_certificate_key cert/note.chengs.run.key; root /www/notes; index index.html;}
123456789101112131415161718192021
server{ listen 443 ssl; server_name api.chengs.run; ssl_certificate cert/api.chengs.run.crt; ssl_certificate_key cert/api.chengs.run.key; location /daxuexi { proxy_pass http://127.0.0.1:8000; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; proxy_set_header Host $host; } location /botmessage/ { proxy_pass http://127.0.0.1:5700/; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; proxy_set_header Host $host; }}
1234567891011
server{ listen 80; server_name jd.chengs.run; location / { proxy_pass http://azure.opaw.tk:5700; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; proxy_set_header Host $host; }}
Seraching...