In Apache HTTP server allow to support multiple domain in a single instance. To do this you need to add some configuration into your Apache HTTP configuration file (httpd.conf)
First you need to tell Apache to support multiple domain by add this directive to your httpd.conf
NamedVirtualHost 80
This configuration will tell Apache to support multiple domain on port 80. You can change port number.
Next, Add ServerName directive to your VirtualHost. Example below
<VirtualHost *:80>
ServerName www.mydomain1.com
ServerAlias mydomain1.com
DocumentRoot "my/path1"
...
...
</VirtualHost>
<VirtualHost *:80>
ServerName www.mydomain2.com
ServerAlias mydomain2.com
DocumentRoot "my/path2"
...
...
</VirtualHost>
Next, Restart Apache HTTP server. After reboot you can access domain that you configure in httpd.conf.

Comments
Post a Comment