Skip to content

Instantly share code, notes, and snippets.

@blackstuend
Last active December 11, 2018 03:07
Show Gist options
  • Save blackstuend/cfad3e1392ee89f3ac6a6fdced5a9ea0 to your computer and use it in GitHub Desktop.
Save blackstuend/cfad3e1392ee89f3ac6a6fdced5a9ea0 to your computer and use it in GitHub Desktop.
  • 開啟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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment