Nginx反向代理 配置

server { listen 5188; // 端口 server_name localhost; // 主機名 location / { root /Users/renliquan/healthAdmin; // 主目錄(網站路徑) index index.html; // 默認頁面 } // 訪問localhost:5188/api/tcb/ 代理到https://api.weixin.qq.com/tcb/ location /api/tcb/ { proxy_pass https://api.weixin.qq.com/tcb/; } location /api/cgi-bin/token { proxy_pass https://api.weixin.qq.com/cgi-bin/token; } }
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章