bwangel
2016-10-11 15:47:51 +08:00
请问你的返回内网地址是什么意思,我用 docker 试了一下,完全可以啊:
```
server {
listen 80;
server_name zvv2x;
proxy_redirect off;
location / {
proxy_http_version 1.1;
proxy_pass http://172.17.0.1:8000;
proxy_buffering off;
client_max_body_size 0;
proxy_connect_timeout 3600s;
proxy_read_timeout 3600s;
proxy_send_timeout 3600s;
send_timeout 3600s;
}
}
```
其中那个 zvv2x 是我的主机名,相当于 localhost , 172.17.0.1 是 docker 容器地址。
响应头是这样的:
HTTP/1.1 200 OK
Server: nginx/1.10.1
Date: Tue, 11 Oct 2016 07:45:31 GMT
Content-Type: text/html; charset=ANSI_X3.4-1968
Transfer-Encoding: chunked
Connection: keep-alive
Content-Encoding: gzip