ITPub博客

首页 > IT基础架构 > 网络安全 > redhat9下使用apache2.0实现个人主页空间的方法1(转)

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

原创 网络安全 作者:BSDLite 时间:2007-08-15 22:50:31 0 删除 编辑
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----->/home/test/dir test用户的个人主页空间
<2>UserDir /var/web 此时用户主页存放在/var/html/username目录里
httpd://localhost/~testuser----->/var/web/testuser
<3>UserDir /var/*/html 此时的用户的主页存放在/var/username/html目录里
httpd://localhost/~testuser------->/var/testuser/html

2、准备目录
cd /etc/skel
mkdir sites
echo "this is user homepage" >> sites/index.html
3、添加实验用户
useradd testuser
4、测试
http://domainname/~testuser

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

请登录后发表评论 登录
全部评论
  • 博文量
    1872
  • 访问量
    4073598