redhat9下使用apache2.0实现个人主页空间的方法1(转)

redhat9下使用apache2.0实现个人主页空间的方法1(转)[@more@]

系统平台:redhat9.0

基本要求:有一个apache2.0的安装。并且包含了mod_userdir模块。 默认的安装包含该模块。

./configure --disable-all --enable-module=alias --enable-module=access --enable-module=auth --enable-module=log_config --enable-module=dir --enable-module=mime --enable-module=userdir

make

make install

###编辑httpd.conf。添加内容如下

UserDir sites

UserDir enabled testuser #只给这个用户开启个人空间

###使每个用户都拥有各自的cgi脚本目录

Options ExecCGI

SetHandler cgi-script

########结束##########

说明:用UserDir dir指定目录时,dir可以有三种表示方法

<1>UserDir dir 目录前没有“/”,此时指该dir在用户的主目录里.

既http://localhost/~test-----&gt/home/test/dir test用户的个人主页空间

<2>UserDir /var/web 此时用户主页存放在/var/html/username目录里

httpd://localhost/~testuser-----&gt/var/web/testuser

<3>UserDir /var/*/html 此时的用户的主页存放在/var/username/html目录里

httpd://localhost/~testuser-------&gt/var/testuser/html

2、准备目录

cd /etc/skel

mkdir sites

echo "this is user homepage" >> sites/index.html

3、添加实验用户

useradd testuser

4、测试

http://domainname/~testuse

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/8225414/viewspace-937999/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/8225414/viewspace-937999/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值