HTTP协议
HTTPS协议
server {
listen 443 ssl;
server_name its.ourwaysoft.com;
ssl_certificate /usr/local/nginx/cert/6062016_its.ourwaysoft.com.pem;
ssl_certificate_key /usr/local/nginx/cert/6062016_its.ourwaysoft.com.key;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
location / {
root /project/OurwayITS/web/dist;
index index.html index.htm;
}
location /api/ {
proxy_pass http://127.0.0.1:50001/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
websocket配置
server {
location /websocket/{
proxy_pass http://localhost:50002/websocket/;
proxy_set_header Host $http_host;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
}
}