nginx反向代理访问速度慢
枫桥 2016-02-20 01:47:19 nginx反向代理访问速度慢, 配置如下
server {
listen 80;
server_name localhost:8080;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
proxy_pass http://localhost:8080;
}
日志:
2016/02/20 13:21:53 [error] 12244#11736: CreateFile() "C:\Users\Administrator\Desktop\nginx-1.9.11\nginx-1.9.11/logs/nginx.pid" failed (2: The system cannot find the file specified)
2016/02/20 13:23:14 [error] 6752#2756: *64 upstream timed out (10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond) while connecting to upstream, client: 127.0.0.1, server: localhost:8080, request: "GET /tomcat.png HTTP/1.1", upstream: "http://[::1]:8080/tomcat.png", host: "localhost", referrer: "http://localhost/"
2016/02/20 13:33:28 [error] 6752#2756: *78 upstream timed out (10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond) while connecting to upstream, client: 127.0.0.1, server: localhost:8080, request: "GET / HTTP/1.1", upstream: "http://[::1]:8080/", host: "localhost"
目测是不能创建nginx.pid这个文件
将localhost改为127.0.0.1后速度正常,可以正常创建nginx.pid这个文件,但是为什么localhost不可以呢?原因有谁知道吗