Ubuntu

在除一台客戶端外的所有機器上通過 SSH 和 HTTP 訪問伺服器

  • September 22, 2019

編輯3:

奇怪的發現。這個問題只發生在一個特定的客戶身上。除了我的主桌面之外,任何電腦都可以通過域名訪問所有三個站點。此桌面只能通過本地 IP 地址 192.168.0.X 訪問伺服器(用於 HTTP 或 SSH),不能通過外部 IP 或域名訪問。在所有其他機器上,一切都按預期工作。

我檢查了我的 fail2ban 日誌和防火牆,以確保這台特定的機器沒有被阻止。還有什麼問題?無法從我的主桌面訪問我的伺服器是一個巨大的痛苦。

兩者都通過乙太網電纜硬連線到同一個路由器,如果這很重要的話。


原帖:

我在 Apache 中定義了三個虛擬主機(所有三個都儲存了 .conf 文件/etc/apache2/sites-available,已通過 啟用a2ensite)。

在從 Ubuntu 16.04 更新到 Ubuntu 18.04 之前,這三個都執行良好。更新後,它們都不會載入到瀏覽器中,所以我做了很多故障排除。這是我到目前為止所做/仔細檢查的內容:

  • 重新安裝 apache2 和 php
  • 已檢查apache2.conf,包括執行apache2ctl -t調試 - 沒有錯誤。
  • 檢查每個站點的 conf 文件,執行apache2ctl -S以確保所有站點都被辨識。每一個都指定ServerName(域名)和DocumentRoot(本地目錄)。這些值已經過三次正確性檢查。
  • 已檢查 DNS 設置。所有三個域名都指向正確的 IP 地址(用於dig確認)。
  • 檢查防火牆設置 - 埠 80 已打開並且 Apache 正在偵聽它。

通過域名訪問三個站點中的任何一個時,瀏覽器都會給出錯誤消息:“無法訪問此站點。domain.com 響應時間過長。”

如果我在瀏覽器中輸入 IP 地址而不是域名,我可以毫無問題地訪問預設站點(Apache 載入的第一個站點)。

我覺得這是某種 Apache 配置,我以某種方式搞砸了,但我所擁有的只是apache2.conf全新安裝的預設文件以及虛擬主機 conf 文件,它們都具有以下格式:

<VirtualHost *:80>
   ServerName somedomain.com
   DocumentRoot "/var/www/foldername"
   <Directory /var/www/foldername>
       Options -Indexes
       AllowOverride XXXXXXXXXX
   </Directory>
</VirtualHost>

AllowOverrideNone用於一個站點和Fileinfo Options另外兩個站點。

知道我錯過了什麼嗎?


**編輯 1:**添加來自digping和的輸出curl

angela@pop-os:~$ dig mydomain.com

; <<>> DiG 9.11.5-P1-1ubuntu2.5-Ubuntu <<>> mydomain.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 65412
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;mydomain.com.          IN  A

;; ANSWER SECTION:
mydomain.com.       1799    IN  A   MY_SERVER_IP

;; Query time: 60 msec
;; SERVER: 127.0.0.53#53(127.0.0.53)
;; WHEN: Sat Aug 31 23:54:55 EDT 2019
;; MSG SIZE  rcvd: 57

angela@pop-os:~$ ping mydomain.com
PING mydomain.com (MY_SERVER_IP) 56(84) bytes of data.
^C
--- mydomain.com ping statistics ---
18 packets transmitted, 0 received, 100% packet loss, time 415ms

angela@pop-os:~$ curl -v mydomain.com
* Expire in 0 ms for 6 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 1 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 2 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 2 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 2 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 2 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 2 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 2 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 2 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 2 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 2 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 2 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 2 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 2 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 2 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 2 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 2 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 2 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 2 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 2 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
* Expire in 0 ms for 1 (transfer 0x558ffb3d7880)
*   Trying MY_SERVER_IP...
* TCP_NODELAY set
* Expire in 200 ms for 4 (transfer 0x558ffb3d7880)

編輯 2:curl ip_address為 netstat 和為 netstat添加輸出。

angela@pop-os:~$ curl -v MY_SERVER_IP
* Expire in 0 ms for 6 (transfer 0x5601183bb880)
*   Trying MY_SERVER_IP...
* TCP_NODELAY set
* Expire in 200 ms for 4 (transfer 0x5601183bb880)
* connect to MY_SERVER_IP port 80 failed: Connection timed out
* Failed to connect to MY_SERVER_IP port 80: Connection timed out
* Closing connection 0
curl: (7) Failed to connect to MY_SERVER_IP port 80: Connection timed out
user@server:~$ sudo netstat -anp | grep apache
tcp6       0      0 :::80                   :::*                    LISTEN      28228/apache2 

我不確定這是否是“正確”的解決方案,但它對我有用。最後,我所做的只是在/etc/hosts無法連接到伺服器的“損壞”客戶端上添加一行。我放置了內部 IP 地址(我將路由器設置為對所有主要設備(包括我的伺服器)保持相同),然後是該伺服器上託管的域的空格分隔列表。例子:

192.168.0.1     domain1.com domain2.com domain3.com sub.domain3.com

這似乎不是一個好的、動態的、永久的修復。但它現在解決了這個問題。

引用自:https://serverfault.com/questions/981457