文章詳情頁
服務(wù)器上nginx無法訪問html的配置問題
瀏覽:167日期:2023-08-14 09:45:10
問題描述
服務(wù)器上 /www/cms/production/current/dist 下有index.html
nginx配置:
server { listen 3002; root /www/cms/production/current/dist; index index.html; server_name xxx.xxx.com; location / { try_files $uri $uri/ /index.html; } location /api/ { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forward-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_set_header X-Nginx-Proxy true; proxy_pass http://127.0.0.1:3000/api; proxy_redirect off; }}
為何通過xxx.xxx.com只顯示了一個welcome to nginx的頁面,顯示不了我的index.html呢?
問題解答
回答1:端口寫錯了,已解決
標簽:
HTML
上一條:vue.js - weex 沒有背景圖片屬性怎么辦?下一條:javascript - mongodb線上環(huán)境報錯Db.prototype.authenticate method will...
相關(guān)文章:
1. MySQL的聯(lián)合查詢[union]有什么實際的用處2. 數(shù)組排序,并把排序后的值存入到新數(shù)組中3. mysql 遠程連接出錯10060,我已經(jīng)設(shè)置了任意主機了。。。4. 網(wǎng)頁爬蟲 - python 爬取網(wǎng)站 并解析非json內(nèi)容5. 默認輸出類型為json,如何輸出html6. python的正則怎么同時匹配兩個不同結(jié)果?7. mysql怎么表示兩個字段的差8. win10 python3.5 matplotlib使用報錯9. PHP訂單派單系統(tǒng)10. php多任務(wù)倒計時求助
排行榜

熱門標簽