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

Nginx已运行但无响应问题求助(CentOS Stream 8环境)

Nginx运行状态正常但返回空响应的问题求助

在CentOS Stream 8系统中通过yum install nginx -y安装Nginx后,执行sudo netstat -plutn | grep nginx确认进程处于监听状态,输出如下:

tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      9962/nginx: master

我的nginx.conf配置内容:

user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;

# Load dynamic modules. See /usr/share/doc/nginx/README.dynamic.
include /usr/share/nginx/modules/*.conf;

events {
    worker_connections 1024;
}

http {
    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;

    sendfile            on;
    tcp_nopush          on;
    tcp_nodelay         on;
    keepalive_timeout   65;
    types_hash_max_size 2048;

    include             /etc/nginx/mime.types;
    default_type        application/octet-stream;

    include /etc/nginx/conf.d/*.conf;

}

/etc/nginx/conf.d/目录下仅有cx.conf文件,内容:

server {
        listen 80;
        return 403;
}

预期访问服务器IP时返回403错误,但实际收到“Empty reply from server”(服务器空响应)。

已完成的排查操作:

  • 端口已放行,测试显示Connection to **.***.***.*** port 80 [tcp/http] succeeded!
  • 服务器上其他非Nginx应用(Docker部署的8080端口服务)可正常访问
  • 卸载并重新安装Nginx,问题未解决
  • 已禁用SELinux

目前Nginx虽显示运行但无法正常响应请求,寻求技术帮助。

内容的提问来源于stack exchange,提问作者Bin

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.07.11 00:10:55