node.js - nginx 部署nodejs 绑定域名出现502 无权限
怪我咯
怪我咯 2017-04-17 12:02:47
0
3
775

nginx配置:

server {
    listen 80;
    server_name blog.caesar.com;

    location ~ {
        proxy_pass http://127.0.0.1:3000;
    }

    root  /usr/local/src/microblog/;
    # access_log /home/wssgcg1213/NB/nginx.access.log;
    # error_log /home/wssgcg1213/NB/nginx.error.log;

    index index.html index.php;
    autoindex off;

    location ~* .*\.(gif|jpg|jpeg|png|bmp|ico|css|js|txt|flv|swf|mid|doc|ppt|xls|pdf|txt|mp3|wma)$ {
            expires 2d;
    }

}

nginx错误:

2015/07/24 01:24:45 [crit] 4584#0: *11 connect() to 127.0.0.1:3000 failed (13: Permission denied) while connecting to upstream, client: 127.0.0.1, server: blog.caesar.com, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:3000/", host: "blog.caesar.com"
2015/07/24 01:24:46 [crit] 4584#0: *11 connect() to 127.0.0.1:3000 failed (13: Permission denied) while connecting to upstream, client: 127.0.0.1, server: blog.caesar.com, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:3000/", host: "blog.caesar.com"
2015/07/24 01:24:47 [crit] 4584#0: *11 connect() to 127.0.0.1:3000 failed (13: Permission denied) while connecting to upstream, client: 127.0.0.1, server: blog.caesar.com, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:3000/", host: "blog.caesar.com"
2015/07/24 01:24:48 [crit] 4584#0: *11 connect() to 127.0.0.1:3000 failed (13: Permission denied) while connecting to upstream, client: 127.0.0.1, server: blog.caesar.com, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:3000/", host: "blog.caesar.com"
2015/07/24 01:24:50 [crit] 4584#0: *11 connect() to 127.0.0.1:3000 failed (13: Permission denied) while connecting to upstream, client: 127.0.0.1, server: blog.caesar.com, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:3000/", host: "blog.caesar.com"
2015/07/24 01:24:51 [crit] 4584#0: *11 connect() to 127.0.0.1:3000 failed (13: Permission denied) while connecting to upstream, client: 127.0.0.1, server: blog.caesar.com, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:3000/", host: "blog.caesar.com"

端口访问:

域名访问:

怪我咯
怪我咯

走同样的路,发现不同的人生

全部回复(3)
黄舟

Q助,求高手

小葫芦

stackoverflow上的回答

阿神

雷雷

雷雷
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板