文章詳情頁
服務(wù)器上nginx無法訪問html的配置問題
瀏覽:154日期: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. PC 手機兼容的 編輯器2. html5和Flash對抗是什么情況?3. php如何獲取訪問者路由器的mac地址4. javascript - 在 vue里面用import引入js文件,結(jié)果為undefined5. python沒入門,請教一個問題6. 小程序怎么加外鏈,語句怎么寫!求救新手,開文檔沒發(fā)現(xiàn)7. git - 使用淘寶npm安裝hexo出現(xiàn)問題?8. javascript - vue-resource中如何設(shè)置全局的timeout?9. thinkPHP5中獲取數(shù)據(jù)庫數(shù)據(jù)后默認選中下拉框的值,傳遞到后臺消失不見。有圖有代碼,希望有人幫忙10. 多選框?qū)戇M數(shù)據(jù)庫怎么寫
排行榜

熱門標簽