CentOS7系統操作httpd服務 - 開機啟動/重啟/查看狀態
第一、啟動、終止、重啟
systemctl start httpd.service #啟動
systemctl stop httpd.service #停止
systemctl restart httpd.service #重啟
第二、設置開機啟動/關閉
systemctl enable httpd.service #開機啟動
systemctl disable httpd.service #開機不啟動
第三、檢查httpd狀態
systemctl status httpd.service
遇到問題:
中文目錄亂碼的問題:
處理的方法:
CentOS7的 echo $LANG 為zh_ch.UTF-8,
所以在配置文件/etc/httpd/conf/httpd.conf 中添加 IndexOptions Charset=UTF-8 即可解決