CentOS7安装Nginx
server {
listen 443 ssl;
server_name xxx.cn www.xxx.cn;
ssl_certificate /usr/local/nginx/7369597_xxx.cn.pem;
ssl_certificate_key /usr/local/nginx/7369597_xxx.cn.key;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
root /home/busapp/ui/;
index index.html;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
client_max_body_size 50M;
location /api/ {
proxy_pass http://127.0.0.1:27071/;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_connect_timeout 60s;
proxy_read_timeout 60s;
proxy_send_timeout 60s;
}
location /ptapi/ {
proxy_pass http://127.0.0.1:27071/;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_connect_timeout 60s;
proxy_read_timeout 60s;
proxy_send_timeout 60s;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}