Note | 解決 Linux Apache 伺服器不能訪問的問題
阿新 • • 發佈:2021-01-05
技術標籤:學習筆記
- 執行 “service iptables status” 時報錯:
Redirecting to /bin/systemctl status iptables.service
Unit iptables.service could not be found.
解決辦法:
$ yum install iptables-services # 安裝 iptables-services
- 解決 Linux Apache 伺服器不能訪問的問題
檢測防火牆
-
開啟 /etc/init.d/iptables start # fys:可使用 "service"命令
-
檢視狀態 /etc/init.d/iptables status
-
開啟80埠(若沒有開啟,網路無法通過http訪問本機)
命令:$ /sbin/iptables -I INPUT -p tcp --dport 80 -j ACCEPT # 開啟80埠,fys:可直接使用 "iptables"命令 $ /etc/rc.d/init.d/iptables save # 儲存防火牆規則,fys:在我的 fedora 好像用不了
fr.
https://www.cnblogs.com/yangfor/p/12857738.html
https://www.cnblogs.com/roland1982/archive/2004/01/13/3513183.html
2021年1月4日