nginx釋出antd-pro專案(別人發的,未測試)
阿新 • • 發佈:2019-01-10
server { listen 80; server_name localhost; #charset koi8-r; charset utf-8; #access_log logs/host.access.log main; # location / { # root html; # index index.html index.htm; # } #對/ 所有做負載均衡+反向代理 location / { proxy_pass http://10.121.22.171:8080; proxy_redirect off; # 後端的Web伺服器可以通過X-Forwarded-For獲取使用者真實IP 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_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504; } #靜態檔案 location ~* / { root /home/qtsm/imb-demo/dist; index index.html index.htm; proxy_pass http://imb; }