文章詳情頁
服務器上nginx無法訪問html的配置問題
瀏覽:300日期:2023-08-14 09:45:10
問題描述

服務器上 /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...
相關文章:
1. docker gitlab 如何git clone?2. docker網絡端口映射,沒有方便點的操作方法么?3. debian - docker依賴的aufs-tools源碼哪里可以找到啊?4. vim - docker中新的ubuntu12.04鏡像,運行vi提示,找不到命名.5. 為什么我ping不通我的docker容器呢???6. docker-compose 為何找不到配置文件?7. docker安裝后出現Cannot connect to the Docker daemon.8. mac連接阿里云docker集群,已經卡了2天了,求問?9. golang - 用IDE看docker源碼時的小問題10. python - 使用scrapy框架爬百度圖片被墻
排行榜

網公網安備