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"
端口访问:
域名访问:
Q for help, seek help from experts
Answer on stackoverflow
or