【发布时间】:2015-05-29 10:38:43
【问题描述】:
这是我的supervisord网络配置,没有密码
[inet_http_server]
port=127.0.0.1:9001
;username=user
;password=1234
这是我的 nginx 配置
location /supervisor/ {
proxy_pass http://127.0.0.1:9001;
proxy_set_header X-Forwarded-Host $server_name;
proxy_set_header X-Real-IP $remote_addr;
add_header P3P 'CP="ALL DSP COR PSAa PSDa OUR NOR ONL UNI COM NAV"';
}
如果我直接从我的服务器中访问 127.0.0.1:9001,我会得到我需要的信息:
root@gosthost:~# curl 127.0.0.1:9001
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Supervisor Status</title>
<link href="stylesheets/supervisor.css" rel="stylesheet" type="text/css" />
<link href="images/icon.png" rel="icon" type="image/png" />
</head>
<body>
<div id="wrapper">
... bla bla bla
</div>
<div class="clr" id="footer">
<div class="left">
<a href="http://supervisord.org">Supervisor</a> <span>3.1.3</span>
</div>
<div class="right">
© 2006-<span>2015</span> <strong><a href="http://agendaless.com/">Agendaless Consulting and Contributors</a></strong>
</div>
</div>
</body>
但如果我尝试从外部世界访问它,它会给我 404:
root@gosthost:~# curl http://46.101.172.89/supervisor/
<head>
<title>Error response</title>
</head>
<body>
<h1>Error response</h1>
<p>Error code 404.
<p>Message: Not Found.
</body>
但这不是 nginx 的原生响应。我可以看到,因为 nginx 签署了自己的错误响应,见下文。这是典型的 nginx 响应
curl http://46.101.172.89/media/
<html>
<head><title>403 Forbidden</title></head>
<body bgcolor="white">
<center><h1>403 Forbidden</h1></center>
<hr><center>nginx/1.6.2</center>
</body>
</html>
所以主管有问题。那会是什么?
【问题讨论】:
标签: nginx supervisord