我进行了 nginx 设置。我把它绑定到3200端口(只是为了检查)
当我在服务器上执行 netstat -pnltu
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:3200 0.0.0.0:* LISTEN -
tcp6 0 0 :::3306 :::* LISTEN -
tcp6 0 0 :::80 :::* LISTEN -
tcp6 0 0 :::22 :::* LISTEN -
tcp6 0 0 :::443 :::* LISTEN -
tcp6 0 0 :::3200 :::* LISTEN
我看到 nginx 真的在监听 3200 端口
但是如果我尝试 nmap mysite.ru(出于安全原因隐藏真实姓名)
PORT STATE SERVICE
22/tcp open ssh
80/tcp open http
443/tcp open https
8080/tcp open http-proxy
实际上端口 3200 没有在侦听。
我使用 Centos 7,没有启用 SELinux 或任何防火墙。
至于nginx配置我只在nginx.conf中添加
include /etc/nginx/conf.d/*.conf;
server {
listen 3200 default_server;
listen [::]:3200 default_server;
server_name _;
root /usr/share/nginx/html;
}
默认后include /etc/nginx/conf.d/.conf;* string
有什么建议吗?谢谢!