apache配置開啟網(wǎng)站服務(wù)步驟
更新時間:2010年06月21日 14:40:40 作者:
apache配置開啟網(wǎng)站服務(wù)步驟,需要的朋友可以參考下。
配置步驟如下:
1、http.conf文件做如下修改:
UserDir public_html #默認的主頁目錄~/public_html
#UserDir enabled username 為某些用戶開啟服務(wù),詳細可以參考UserDir用法
<Directory "/home/*/public_html">
Options Indexes Includes FollowSymLinks
Allowoverride None
Order allow,deny
Allow from all
</Directory>
2、在相應的用戶目錄下建立public_html文件夾,設(shè)置SElinux
chcon -R -t httpd_sys_content_t
3、copy網(wǎng)頁到該目錄
4、修改/home/username的屬性為711
5、重啟apache,輸入http://ip/~username應該可以看到了。
1、http.conf文件做如下修改:
UserDir public_html #默認的主頁目錄~/public_html
#UserDir enabled username 為某些用戶開啟服務(wù),詳細可以參考UserDir用法
復制代碼 代碼如下:
<Directory "/home/*/public_html">
Options Indexes Includes FollowSymLinks
Allowoverride None
Order allow,deny
Allow from all
</Directory>
2、在相應的用戶目錄下建立public_html文件夾,設(shè)置SElinux
chcon -R -t httpd_sys_content_t
3、copy網(wǎng)頁到該目錄
4、修改/home/username的屬性為711
5、重啟apache,輸入http://ip/~username應該可以看到了。
相關(guān)文章
LuManager圖文安裝使用教程和創(chuàng)建MysqL快速建站基本教程
這篇文章主要介紹了LuManager圖文安裝使用教程和創(chuàng)建MysqL快速建站基本教程,需要的朋友可以參考下2016-04-04error while loading shared libraries xx.so處理方法
一般我們在Linux下執(zhí)行某些外部程序的時候可能會提示找不到共享庫(error while loading shared libraries xx.so)的錯誤2013-04-04Linux Shell里面生成隨機數(shù)的一些思路分析
這篇文章主要介紹了Linux Shell里面生成隨機數(shù)的一些思路分析,需要的朋友可以參考下2016-07-07Apache服務(wù)器中使用.htaccess實現(xiàn)偽靜態(tài)URL的方法
這篇文章主要介紹了Apache服務(wù)器中使用.htaccess實現(xiàn)偽靜態(tài)URL的方法,示例結(jié)合PHP腳本,需要的朋友可以參考下2015-07-07Ubuntu下LAMP環(huán)境配置教程(linux)
這篇文章主要為大家詳細介紹了Ubuntu下LAMP環(huán)境配置教程,感興趣的小伙伴們可以參考一下2016-06-06