kukiius
2018-01-22 14:20
采纳率: 50%
浏览 4.4k
已采纳

linux下配置nginx外部访问不到!

本机使用localhost可以访问80和其他端口,使用ip可以访问80端口但是其他端口访问不了,30010端口在Nginx配置了,请问是什么原因?

ufw status:命令
Status: active
To Action From


30011 ALLOW Anywhere
22 ALLOW Anywhere
80 ALLOW Anywhere
30010 ALLOW Anywhere
8080 ALLOW Anywhere
30011 (v6) ALLOW Anywhere (v6)
22 (v6) ALLOW Anywhere (v6)
80 (v6) ALLOW Anywhere (v6)
30010 (v6) ALLOW Anywhere (v6)
8080 (v6) ALLOW Anywhere (v6)

netstat -anop:
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name Timer
tcp 0 0 0.0.0.0:30010 0.0.0.0:* LISTEN 1293/nginx -g daemo off (0.00/0/0)
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 1293/nginx -g daemo off (0.00/0/0)
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 922/sshd off (0.00/0/0)
tcp 0 0 172.18.209.93:47520 106.11.68.13:80 ESTABLISHED 852/AliYunDun off (0.00/0/0)
tcp 0 464 172.18.209.93:22 116.77.73.248:65104 ESTABLISHED 941/0 on (0.24/0/0)
tcp6 0 0 :::80 :::* LISTEN 1293/nginx -g daemo off (0.00/0/0)
tcp6 0 0 :::21 :::* LISTEN 742/vsftpd off (0.00/0/0)
udp 0 0 172.18.209.93:123 0.0.0.0:* 800/ntpd off (0.00/0/0)
udp 0 0 127.0.0.1:123 0.0.0.0:* 800/ntpd off (0.00/0/0)
udp 0 0 0.0.0.0:123 0.0.0.0:* 800/ntpd off (0.00/0/0)
udp 0 0 0.0.0.0:68 0.0.0.0:* 609/dhclient off (0.00/0/0)
udp6 0 0 :::123 :::* 800/ntpd off (0.00/0/0)

lsof -i:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
dhclient 609 root 6u IPv4 11248 0t0 UDP *:bootpc
vsftpd 742 root 3u IPv6 13361 0t0 TCP *:ftp (LISTEN)
ntpd 800 ntp 16u IPv6 13561 0t0 UDP *:ntp
ntpd 800 ntp 17u IPv4 13564 0t0 UDP *:ntp
ntpd 800 ntp 18u IPv4 13568 0t0 UDP localhost:ntp
ntpd 800 ntp 19u IPv4 13570 0t0 UDP 172.18.209.93:ntp
AliYunDun 852 root 19u IPv4 14002 0t0 TCP 172.18.209.93:47520->106.11.68.13:http (ESTABLISHED)
sshd 922 root 3u IPv4 14447 0t0 TCP *:ssh (LISTEN)
sshd 941 root 3u IPv4 14764 0t0 TCP 172.18.209.93:ssh->116.77.73.248:65104 (ESTABLISHED)
nginx 1293 root 6u IPv4 17423 0t0 TCP *:30010 (LISTEN)
nginx 1293 root 7u IPv4 17424 0t0 TCP *:http (LISTEN)
nginx 1293 root 8u IPv6 17425 0t0 TCP *:http (LISTEN)
nginx 1294 www-data 6u IPv4 17423 0t0 TCP *:30010 (LISTEN)
nginx 1294 www-data 7u IPv4 17424 0t0 TCP *:http (LISTEN)
nginx 1294 www-data 8u IPv6 17425 0t0 TCP *:http (LISTEN)

5条回答 默认 最新

相关推荐 更多相似问题