Linux系統Apache服務 - 配置HTTP的默認主頁


 1、安裝HTTPD和httpd-manual軟件包

# yum -y install http httpd-manual

2、創建/var/www/html/index.html 內容是 Hello World ,暫時作為 web 服務的主頁

# echo 'hello world' > /var/www/html/index.html

3、啟動HTTPD服務

# systemctl restart httpd
# systemctl enable httpd

4、開啟防火牆規則,放行http

# firewall-cmd --permanent --add-service=http
success
# firewall-cmd --reload 
success

5、嘗試訪問創建的web服務

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM