Baidu Cloud BCC configuration Apache VirtualHost implementation of the same domain name different port access to different applications

Source: Internet
Author: User

Description: Pre-play: I purchased the BCC virtual service on the Baidu Cloud, and purchased the domain name, deploy the application, can be normal access (here everything is normal ^_^).

Things are changing: as the development progresses, the project after the successful local testing, deployment to the server, will find some pages and local testing inconsistencies, and these features are directly oriented to the customer, will leave a very irresponsible impression to the customer, even ....

Solution: 1. Purchase other domain names, also deploy, as test environment, can be in the online version of the synchronization (but this requires shining white of silver)

2. Can the different ports of the same domain point to different applications???

So began a test and tuning ....

Recording:

Edit httpd.conf in the/etc/httpd/conf/directory

Step One: Add Port monitoring:

1 8001

Step two: At the end add the hypothetical application directory under/var/www/html/domain2

1<virtualhost *:8001>2documentroot/var/www/html/domain23 ServerName www.yourdomain.com4<directory"/var/www/html/domain2">5 Options Indexes followsymlinks6 allowoverride All7 Order Allow,deny8  allow from all9</Directory>Ten</VirtualHost>

Step Three: Restart Apache

1 Service httpd restart

It's finally done.

Baidu Cloud BCC configuration Apache VirtualHost implementation of the same domain name different port access to different applications

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.