Redhat9 use apache2.0 to achieve personal homepage space

Source: Internet
Author: User
Tags contains
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



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.