Configure Virtual Hostings to use multiple domain names.
For example, add a new host setting where the domain name is virtual.host, and the document root is /var/www/virtual.host.
# Edit vhost configuration
[root@www ~]# vi /etc/httpd/conf.d/vhost.conf
# Create new settings
# Settings for the original domain
<VirtualHost *:80>
DocumentRoot /var/www/html
ServerName www.emc.world
</VirtualHost>
# Settings for the new domain
<VirtualHost *:80>
DocumentRoot /var/www/virtual.host
ServerName www.virtual.host
ServerAdmin webmaster@virtual.host
ErrorLog logs/virtual.host-error_log
CustomLog logs/virtual.host-access_log combined
</VirtualHost>
<Directory "/var/www/virtual.host">
Options FollowSymLinks
AllowOverride All
</Directory>
# Create the directory for the new virtual host
[root@www ~]# mkdir /var/www/virtual.host
[root@www ~]# chmod 755 /var/www/virtual.host
# Reload the httpd service to apply changes
[root@www ~]# systemctl reload httpd
Create a test page and access it from any client computer with a web browser. It's OK if the following page is shown.
# Create a test page for the new virtual host
[root@www ~]# vi /var/www/virtual.host/index.html
<html>
<body>
<div style="width: 100%; font-size: 40px; font-weight: bold; text-align: center;">
Virtual Host Test Page
</div>
</body>
</html>
After setting up the Virtual Hostings, you can test it by accessing it from a web browser.
http://[domain]Replace [domain] with your server's domain name or IP address.