You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Nginx第二服务器localhost:9000连接重置问题(PHP8.3环境)

Nginx第二服务器localhost:9000连接重置问题(PHP8.3环境)

我现在碰到一个棘手的问题:我想通过 localhost:9000 来搭配 PHP 8.3 运行项目,但访问 localhost:5000 完全正常,一打开 localhost:9000 就弹出下面的提示:

The connection was reset

我尝试执行 nginx -s reload 重启Nginx,但终端没有输出任何报错信息。

我的Nginx配置如下:

# another virtual host using mix of IP-, name-, and port-based configuration
#
server {
    listen       9000;
    server_name  localhost;

    location / {
        index  index.php;
    }
    
    # proxy the PHP scripts to Apache listening on 127.0.0.1:80
    #
    #location ~ \.php$ {
    #    proxy_pass   http://127.0.0.1;
    #}

    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
    #
    location ~ \.php$ {
        root           www;
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include        fastcgi_params;
    }
}

我运行的PHP相关命令是:

  • C:\php8.3\php-cgi.exe ...

备注:内容来源于stack exchange,提问作者Alix Blaine

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.16 09:59:35