我有一台运行 Ubuntu 20.04.3 LTS(Focal Fossa)的服务器。它的 IP 地址为 192.168.1.12
当我使用 Web 浏览器访问 192.168.1.12 时,会出现 NextCloud 登录信息。这一切都很好,只是我没有(故意)安装 NextCloud。当我使用 telnet 连接到端口 80 时:
当我通过端口 80 上的 telnet 连接到服务器以获取更多信息时:
> telnet 192.168.1.12 80
Trying 192.168.1.12...
Connected to 192.168.1.12.
Escape character is '^]'.
head / http/1.0
HTTP/1.1 400 Bad Request
Date: Mon, 14 Mar 2022 17:24:15 GMT
Server: Apache
Content-Length: 226
Connection: close
Content-Type: text/html; charset=iso-8859-1
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>400 Bad Request</title>
</head><body>
<h1>Bad Request</h1>
<p>Your browser sent a request that this server could not understand.<br />
</p>
</body></html>
Connection closed by foreign host.
当我运行 apt list --installed 时,没有对 nextcloud 的引用,也没有对 apache 的引用:
> apt list --installed | egrep -i 'apache|next'
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
dennis@r2d2:/etc/init.d 03/14 13:26:49
查看 /etc 我没有看到任何名为 apache2(或类似名称)的文件夹,也没有名为 nextcloud 类似的文件夹。
所以我搞不清楚这一切是如何运作的。我如何才能确定网络服务器的位置并开始控制它提供的内容?
lsof(感谢@djdomi)显示以下内容:
root@r2d2:~# netstat -anp | grep apache
root@r2d2:~# lsof -i :80
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
Plex\x20M 834 plex 62u IPv4 158905392 0t0 TCP r2d2.lovelady.com:56860->ec2-52-16-11-44.eu-west-1.compute.amazonaws.com:http (CLOSE_WAIT)
Plex\x20T 1670 plex 75u IPv4 32467 0t0 TCP r2d2.lovelady.com:50452->ec2-18-203-176-12.eu-west-1.compute.amazonaws.com:http (CLOSE_WAIT)
httpd 1358151 root 3u IPv4 157704069 0t0 TCP *:http (LISTEN)
httpd 1358153 root 3u IPv4 157704069 0t0 TCP *:http (LISTEN)
httpd 1358154 root 3u IPv4 157704069 0t0 TCP *:http (LISTEN)
httpd 1358155 root 3u IPv4 157704069 0t0 TCP *:http (LISTEN)
httpd 2958297 root 3u IPv4 157704069 0t0 TCP *:http (LISTEN)
再次感谢@djdomi,我运行了以下命令;看起来 Plex 可能是我正在寻找的罪魁祸首,但仍然没有对原始问题的真正答案:
root@r2d2:/etc/init.d# ps auxwww |egrep '834|1670'
plex 834 0.2 0.3 118780 75268 ? Ssl Jan31 131:48 /usr/lib/plexmediaserver/Plex Media Server
plex 1670 0.0 0.0 42192 12528 ? Sl Jan31 51:51 /usr/lib/plexmediaserver/Plex Tuner Service /usr/lib/plexmediaserver/Resources/Tuner/Private /usr/lib/plexmediaserver/Resources/Tuner/Shared 1.24.2.4973-2b1b51db9 32600
显示的路径仅包含一堆 .ini 文件。