文章詳情頁
服務(wù)器上nginx無法訪問html的配置問題
瀏覽:142日期: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:端口寫錯了,已解決
標(biāo)簽:
HTML
上一條:vue.js - weex 沒有背景圖片屬性怎么辦?下一條:javascript - mongodb線上環(huán)境報錯Db.prototype.authenticate method will...
相關(guān)文章:
1. javascript - node.js promise沒用2. android 如何實現(xiàn)如圖中的鍵盤上的公式及edittext的內(nèi)容展示呢3. c++ - 如何正確的使用QWebEngineView?4. golang - 用IDE看docker源碼時的小問題5. javascript - js 寫一個正則 提取文本中的數(shù)據(jù)6. 算法 - python 給定一個正整數(shù)a和一個包含任意個正整數(shù)的 列表 b,求所有<=a 的加法組合7. yii2中restful配置好后在nginx下報404錯誤8. java - 我在用Struts2上傳文件時,報以下錯誤怎么回事?9. PHP注冊功能10. php - 注冊驗證郵箱失效后操作問題
排行榜

熱門標(biāo)簽