Centos Subdomain binding subdirectory process record

Source: Internet
Author: User
Tags subdomain

Loading and Writing module
LoadModule rewrite_module modules/mod_rewrite.so
Add configuration

The third line above has an absolute path, which is used to map subdirectories, depending on what directory is dependent on the server.

Restart Apache service after Setup is complete

Service Apache2 Restart
Or
Service httpd Restart

Create a Vhost.map file

Create a Vhost.map file under the path specified above

cd/opt/lampp/etc/
Vim Vhost.map

Enter sub-directory information for sub-domain names, such as

test.lizhangqu.com /var/www/test/demo.lizhangqu.com /var/www/demo/

No need to restart Apache service after adding sub-domain Information

Resolving sub-domains

To resolve the sub-domain name to the server, see figure

Centos Subdomain binding subdirectory process record

Related Article

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.