【发布时间】:2026-01-13 14:00:05
【问题描述】:
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 16146/nginx: master
nginx 确实监听了 80 端口。这是我在 /etc/nginx/conf.d/default.conf 中的配置
server {
listen 80;
server_name _;
#charset koi8-r;
#access_log /var/log/nginx/log/host.access.log main;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ { ...
我正在使用公共 ip 在云主机上运行 nginx,但由于连接超时,我无法从公共网络访问该 ip。
【问题讨论】: