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)