apache| Personal Homepage
1. System Platform: redhat9.0
Basic requirements: There is a apache2.0 installation. and contains the Mod_userdir module. The default installation contains the module.
./configure--disable-all--enable-module=alias--enable-module=access--enable-module=auth--enable-module=log_ Config--enable-module=dir--enable-module=mime--enable-module=userdirmakemake install
|
# # #编辑httpd. conf. Add content as follows
Userdir Sites
Userdir enabled TestUser #只给这个用户开启个人空间
# # #使每个用户都拥有各自的cgi脚本目录
<directory/home/*/cgi-bin>options Execcgisethandler cgi-script</directory>
|
####### #结束 ##########
Note: When specifying a directory with Userdir dir, dir can have three representations
The <1>userdir dir directory does not have "/" before "/", at which point the dir is in the user's home directory.
Http://localhost/~test----->/home/test/dir Test User's personal home page space
<2>userdir/var/web at this point the user homepage is stored in the/var/html/username directory.
Httpd://localhost/~testuser----->/var/web/testuser
<3>userdir/var/*/html at this time the user's homepage is stored in the/var/username/html directory
Httpd://localhost/~testuser------->/var/testuser/html
2. Prepare catalogue
Cd/etc/skel
mkdir Sites
echo "This is User homepage" >> sites/index.html
3. Add Experiment User
Useradd testuser
4, testing
Http://domainname/~testuser