服务器问答

Windows 10 下 Nginx + PHP 使用 80 端口时无法访问,报 upstream timed out 10060 错误
0
2021-05-19 19:23:36
idczone

之前查到了很多解决方案,改过 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

请问各位这时什么原因?




数据地带为您的网站提供全球顶级IDC资源
在线咨询
专属客服