V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
NGINX
NGINX Trac
3rd Party Modules
Security Advisories
CHANGES
OpenResty
ngx_lua
Tengine
在线学习资源
NGINX 开发从入门到精通
NGINX Modules
ngx_echo
EAimTY
V2EX  ›  NGINX

Windows 10 下 Nginx + PHP 使用 80 端口时无法访问,报 upstream timed out 10060 错误

  •  
  •   EAimTY ·
    EAimTY · 2019-09-21 12:02:25 +08:00 · 1988 次点击
    这是一个创建于 1673 天前的主题,其中的信息可能已经有所发展或是发生改变。

    之前查到了很多解决方案,改过 nginx 配置文件里的 timeout 时长,改过 fastcgi 端口,禁用了系统的 ipv6,基本上 能试的方法都试过了,仍然没有解决。在 nginx 的 server port 使用其它非 80 端口时没有这个问题。

    nginx 配置文件:

    worker_processes  1;
    
    error_log  logs/error.log;
    pid        logs/nginx.pid;
    
    events {
        # Max value 16384
        worker_connections  8192;
        # Accept multiple connections
        multi_accept on;
    }
    
    # Settings that affect all server blocks
    http {
        include php_processes.conf;
        include       mime.types;
        default_type  application/octet-stream;
    
        access_log  logs/access.log;
    
        sendfile on;
    
        keepalive_timeout  65;
        ssl_session_timeout 10m;
        ssl_protocols TLSv1.2 TLSv1.1 TLSv1 SSLv3;
        ssl_ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AES:RSA+3DES:!ADH:!AECDH:!MD5:!DSS; 
        ssl_prefer_server_ciphers on;
        gzip  on;
    
        client_max_body_size 2048m;
        server_tokens on;
    
        server {
            listen        80;
            server_name        localhost;
            root        /PATH/TO/DIR;
            index        index.php;
    
            location ~ .*\.php(\/.*)*$ {
                fastcgi_pass 127.0.0.1:9000;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                include fastcgi_params;
            proxy_read_timeout 3600s;
                proxy_send_timeout 3600s;
            }
        }
    }
    

    PHP listen 的也是 127.0.0.1:9000

    请问各位这时什么原因?

    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2866 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 13:08 · PVG 21:08 · LAX 06:08 · JFK 09:08
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.