Ubuntu (14.04 version) Configure the virtual environment (one IP for multiple domain names)

Source: Internet
Author: User
Tags virtual environment

The following actions are established when the APAHCE installation is successful

1. Configure the local host.

Assuming that the IP on the virtual host is: 192.168.1.51, then the client local host can be configured as:

  

This configures three level two domain names.

2. Configure the directory where the corresponding domain name is accessed.

Go to/var/www/html/create three directory files below

Video,bbs,oa. and create three different content index.html files in three directories, respectively, to distinguish them when they are accessed.

Note: If it is a different directory, you must assign the appropriate permissions

3. Configure the configuration file corresponding to three domain names.

To create a configuration file for three domain names, keep the suffix name. conf

Cp/etc/apache2/sites-available/000-default.conf video.conf

Cp/etc/apache2/sites-available/000-default.conf bbs.conf

Cp/etc/apache2/sites-available/000-default.conf oa.conf

Modify the contents of the three files as follows:

Video.conf:

Bbs.conf:

  

Oa.conf

  

Note: ServerName and Serveralias don't fall.

4. Turn off the default website and open the corresponding website for three domains.

A2dissite 000-default.conf

A2ensite video.conf

A2ensite bbs.conf

A2ensite oa.conf

5. Restart Apache.

Service Apache2 Restart

6. Open the corresponding domain name to access the corresponding page.

  

Ubuntu (14.04 version) Configure the virtual environment (one IP for multiple domain names)

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.