zhizhi/guanghuice-nginx.conf

45 lines
1.2 KiB
Plaintext

server {
server_name guanghuice.com;
location / {
proxy_pass http://127.0.0.1:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
location /code/ {
proxy_pass http://127.0.0.1:3002/;
proxy_set_header Host $host;
}
location /fanqie/ {
proxy_pass http://127.0.0.1:3916/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
location /orders/ {
proxy_pass http://127.0.0.1:3920/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
location /api/ {
proxy_pass http://193.112.126.174:3915/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
listen 443 ssl;
ssl_certificate /etc/letsencrypt/live/guanghuice.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/guanghuice.com/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
}
server {
if ($host = guanghuice.com) { return 301 https://$host$request_uri; }
listen 80;
server_name guanghuice.com;
return 404;
}