【发布时间】:2016-05-08 21:15:31
【问题描述】:
我对 NGINX 有一个非常奇怪的问题。
我有以下upstream.conf 文件,其中包含以下上游:
upstream files_1 {
least_conn;
check interval=5000 rise=3 fall=3 timeout=120 type=ssl_hello;
server mymachine:6006 ;
}
在locations.conf中:
location ~ "^/files(?<command>.+)/[0123]" {
rewrite ^ $command break;
proxy_pass https://files_1 ;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
在 /etc/hosts 中:
127.0.0.1 localhost mymachine
当我这样做时:wget https://mynachine:6006/alive --no-check-certificate,我得到HTTP request sent, awaiting response... 200 OK。我还验证了端口 6006 正在使用 netstat 进行侦听,并且正常。
但是当我向 NGINX 文件服务器发送请求时,我收到以下错误:
连接上游时没有实时上游,客户端:..,请求:“POST /files/save/2 HTTP/1.1,上游:“https://files_1/save”
但是上游没问题。有什么问题?
【问题讨论】:
-
这是唯一的错误信息吗?
-
@RichardSmith:是的。在此之前,在
error.log我得到以下行:a client request body is buffered to a temporary file /var/cache/nginx/client_temp/0000000025... -
您是否设法解决了这个问题?我在尝试将 Nginx 用作 Java 服务器的代理服务器时遇到了同样的问题。
-
今天居然遇到了类似的问题。甚至没有改变任何东西。并且设置已经运行了几个月没有问题。直到今天。
标签: nginx