怎么查看nginx端口


本文摘自PHP中文网,作者步履不停,侵删。

使用命令netstat -apn查看nginx端口使用情况,再使用ps -aux | grep 7017看哪个进程pid被哪个应用程序所使用。

1

2

3

4

5

6

7

8

9

10

11

12

[root@iZ94j7ahvuvZ sbin]# netstat -apn

Active Internet connections (servers and established)

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      7017/nginx         

tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LISTEN      870/sshd           

tcp        0      0 0.0.0.0:3306                0.0.0.0:*                   LISTEN      991/mysqld         

tcp        0      0 120.25.153.204:51072        110.75.102.62:80            ESTABLISHED 1149/AliYunDun     

tcp        0     52 120.25.153.204:22           49.73.142.235:49769         ESTABLISHED 2231/sshd          

udp        0      0 120.25.153.204:123          0.0.0.0:*                               878/ntpd           

udp        0      0 10.116.151.96:123           0.0.0.0:*                               878/ntpd           

udp        0      0 127.0.0.1:123               0.0.0.0:*                               878/ntpd           

udp        0      0 0.0.0.0:123                 0.0.0.0:*                               878/ntpd

看哪个进程pid被哪个应用程序所使用

1

2

3

[root@iZ94j7ahvuvZ sbin]# ps -aux | grep 7017Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.8/FAQ

root      7017  0.0  0.0  24276   788 ?        Ss   11:07   0:00 nginx: master process ./nginx

root      7044  0.0  0.0 103264   856 pts/0    S+   11:22   0:00 grep 7017

更多Nginx相关技术文章,请访问Nginx教程栏目进行学习!

阅读剩余部分

相关阅读 >>

nginx修改配置文件以后怎么重启

nginx如何解决请求跨域问题

nginx为什么快

nginx location是什么

apache和nginx可以装一起吗

centos7系统中端口无法访问怎么办

nginx常用命令介绍

如何查看linux端口

怎么更改nginx配置文件路径

centos下如何查看端口是否已经开启

更多相关阅读请进入《nginx》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...