请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

nginx 重启成功了,不知道为什么一直在nginx欢迎页面,进不到,hello word? 看了一下别的同学的问答,修改了proxy_pass 也没有用

nginx 重启成功了,不知道为什么一直在nginx欢迎页面,进不到,hello word? 看了一下别的同学的问答,修改了proxy_pass 也没有用

正在回答 回答被采纳积分+3

插入代码

2回答

Scott 2019-03-14 22:17:20

curl http://127.0.0.1:3000 是能有内容返回对吧。


nginx 也重新启动下,另外这个配置文件有被 nginx 主文件 include 进去吧

0 回复 有任何疑惑可以回复我~
Scott 2019-03-06 08:14:49

从服务器上


curl http://127.0.0.1:xxxx 你的端口号,看 node 服务有没有开起来。


另外可以 nginx 配置文件贴出来看下有没有哪里配置的有问题


0 回复 有任何疑惑可以回复我~
  • 提问者 谜语大全 #1
    node 服务 已经开起来了:tream app {
      server 127.0.0.1:3000;
    }
    server {
      listen 80;
      server_name app.lionkingchf.com;
      location / {
        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://app;
        proxy_redirect off;
      }
    
    }
    
    还是停留在Nginx欢迎界面
    回复 有任何疑惑可以回复我~ 2019-03-13 08:37:02
问题已解决,确定采纳
还有疑问,暂不采纳
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号