在安裝 Apache 後,為了方便個人帳號建立網頁,可以開啟 Apache 個人網頁使用空間,提供
使用者自行建置網站。
設定 httpd.conf 檔案
#vi /etc/httpd/conf/httpd.conf
將 UserDir disable 加上 #,並且去掉 UserDir public_html 的 #
去掉下方設定內容的 #
在個人帳號中,建立 public_html 目錄與設定相關權限,並使用 cat 建立測試檔案,點選Ctrl+C
離開 (需關閉 SELinux)
重新啟動 Apache
#service httpd restart
瀏覽器輸入 http://你的IP/~帳號/index.htm,執行結果如下
全站熱搜
留言列表