- 開啟apache
將SELINUX 調為disabled
# vim /etc/selinux/config
重啟電腦(調整selinux )
reboot
關閉防火牆
# systemctl stop firewalld
將防火牆開機關閉
# systemctl disable firewalld
用scp將html傳到/var/www/html底
- 使用使用者架設網站
調整apache userdir(讓使用者可以在apache 架設自己網站)
# gedit /etc/httpd/conf.d/userdir.conf
將 userdir disabled 取消掉
將 userdir public_html 使用
調整完要重啟http
# systemctl reload htppd (使用reload 代替restart)
在使用者那邊創一個public_html
# mkdir /home/user/public_html
將網頁放進public_html
更改權限(資料夾a+x 文件 a+r)
# chmod a+x directoryname
# chmod a+x filename