centos7 http目錄訪問

 

安裝httpd

yum install httpd

看到安裝完成之後,我們執行

httpd -version

如果能看到輸出的版本信息,則說明安裝成功。

啓動一些服務器

service httpd start

如果出現“address already in use”則我們需要修改我們的端口,

配至進入:

/etc/httpd/conf/httpd.conf

可以修改服務器名稱和端口:

ServerName localhost:8000
 

修改文件目錄:

 

防火牆端口設置:打開端口 80

重啓:systemctl restart iptables.service

重啓http服務

在終端執行命令  systemctl restart httpd  

或者:systemctl status httpd.service

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章