How to Use apache2.0 in redhat9 to implement personal homepage space 1
Source: Internet
Author: User
In redhat9, use apache2.0 to implement the personal homepage space. 1. Linux Enterprise Application-Linux server application information. For details, see the following. System Platform: redhat9.0
Basic requirements: There is an apache2.0 installation. It also contains the mod_userdir module. This module is installed by default.
. /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
### Edit httpd. conf. Add the following content:
UserDir sites
UserDir enabled testuser # Only enable personal space for this user
### Make each user have their own cgi script directory
Options ExecCGI
SetHandler cgi-script
######## End ##########
Note: When Using UserDir dir to specify a directory, there are three methods to express dir.
<1> there is no "/" before the UserDir dir Directory, which means that the dir is in the user's main directory.
Http: // localhost /~ Test ----->/home/test/dir test user's personal homepage Space
<2> UserDir/var/web: the user homepage is stored in the/var/html/username directory.
Httpd: // localhost /~ Testuser ----->/var/web/testuser
<3> UserDir/var/*/html the user's home page is stored in the/var/username/html directory.
Httpd: // localhost /~ Testuser ------->/var/testuser/html
2. Prepare the Directory
Cd/etc/skel
Mkdir sites
Echo "this is user homepage"> sites/index.html
3. Add lab users
Useradd testuser
4. Test
Http: // domainname /~ Testuser
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