亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

阿里云上面用node.js + nginx搭建網站,每次訪問都是‘welcom to nginx’

阿里云上面用node.js + nginx搭建網站,每次訪問都是‘welcom to nginx’

白豬掌柜的 2018-07-10 16:28:26
我在阿里云上面用node.js + nginx搭建一個個人網站,但是每次訪問都是‘welcom to nginx’提示server.js文件http.createServer(function(req, res){   const pathname = url.parse(req.url).pathname;   console.log(pathname);   switch(pathname){       case '':       case '/':          index(req, res);break;       default:          loadfiels(req, res, pathname);break;    } }).listen(9000, '0.0.0.0');用pm2運行這個文件,啟動成功了:nginx 的配置conf/servers的文件下面有一個web.conf文件server {  listen       80;  server_name  tonghuiflang.com;  location / {      proxy_pass http://127.0.0.1:9000;   } }在conf/nginx.conf 和 conf/nginx.conf.default 的http最后 添加 include servers/*;可是通過域名訪問還是‘welcom to nginx’提示,在本地是沒有問題的
查看完整描述

2 回答

?
LEATH

TA貢獻1936條經驗 獲得超7個贊

更新配置后重啟 nginx 了嗎?

查看完整回答
反對 回復 2018-07-10
  • 2 回答
  • 0 關注
  • 763 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號