今天搞nginx,添加了个server:
server {
listen 80;
server_name jenkins.mydomain.com;
error_log /var/log/nginx/jenkins.error_log info;
location / {
proxy_pass http://localhost:8080;
}
}
回到家后发现返回502,日志里是:
013/12/03 09:41:07 [error] 9489#0: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 221.219.229.244, server: jenkins.mydomain.com, request: "GET /favicon.ico HTTP/1.1", upstream: "http://127.0.0.1:8080/favicon.ico", host: "jenkins.mydomain.com"
结果发现jenkins没有启动。。。
service jenkins start
好了。