【发布时间】:2022-01-21 10:53:20
【问题描述】:
我想为我的项目使用 8080 端口,但是 NGINX 服务器已经使用了 8080 端口。(当我到达 localhost:8080/ 时,我可以找到默认的 NGINX 页面,例如“欢迎使用 nginx!”)
我使用以下命令检查了 IP 端口列表,但列表中没有任何内容。
(我也尝试了sudo 命令,但它不起作用。
- 尝试以下命令
lsof -n -i TCP:8080
lsof -i tcp:8080
sudo lsof -i :8080
- 没有找到
➜ ~ lsof -n -i TCP:80-8099
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
ControlCe 504 shong 20u IPv4 0xd3724dd7a7ab78ad 0t0 TCP *:afs3-fileserver (LISTEN)
ControlCe 504 shong 21u IPv6 0xd3724dd7a7aaa695 0t0 TCP *:afs3-fileserver (LISTEN)
ControlCe 504 shong 22u IPv4 0xd3724dd7a7ab6e0d 0t0 TCP *:commplex-main (LISTEN)
ControlCe 504 shong 23u IPv6 0xd3724dd7a7aaad75 0t0 TCP *:commplex-main (LISTEN)
com.docke 865 shong 83u IPv4 0xd3724dd7b58b2e0d 0t0 TCP 127.0.0.1:sun-sr-https (LISTEN)
Code\x20H 1394 shong 23u IPv4 0xd3724dd7b5f82e0d 0t0 TCP 172.30.1.56:49195->20.43.132.130:https (CLOSED)
➜ ~ lsof -n -i TCP:8080
➜
【问题讨论】: