curl http://192.168.10.130/ curl: (7) Failed to connect to 192.168.10.130 port 80: No route to host 的報錯解決
開啟http服務后,本機可以執行命令curl http://192.168.10.130/ 訪問主頁,其他機器不可以,而其他機器ssh該台虛擬機是可以的,但執行curl http://192.168.10.130/ 報錯沒有到該主機的連接,方法:
centos7查看防火牆的狀態:
執行firewall-cmd --state:
關閉防火牆:執行:systemctl stop firewalld.service,再次查看狀態:
再次訪問主頁:
網頁中訪問,成功:
禁止防火牆開機啟動:systemctl disable firewalld.service