Configure Multiple Domains in apache for local development
Reading time: 1 mins

Configure Multiple Domains in apache for local development

To configure multiple domains or subdomains in WAMP or XAMP's apache server for Local Development using httpd.conf, httpd-vhosts.conf (Virtualhost config) and host file of windows.
First of all open the  file: path\to\wamp\bin\apache\Apachex.x.x\conf\extra\httpd-vhosts.conf
[note: x.x.x is the version of apache]
Look for NameVirtualHost *:80  and  replace it with: NameVirtualHost *
Next open the file: \wamp\bin\apache\Apachex.x.x\conf\httpd . conf
Look for  #Include conf/extra/httpd-vhosts.conf    
Delete the # (Uncomment)
Open the file: C:\Windows\System32\drivers\etc\hosts you will need the administrator account to edit this file. On windows 7 Run Notepad as admin and open the file.
For Each domain you will add the following:
Now in the file \wamp\bin\apache\Apachex.x.x\conf\extra\httpd-vhosts.conf
For Each domain add the following:
<VirtualHost *:80>
DocumentRoot "C:/wamp/www/dev-site/"
<VirtualHost *:80>
DocumentRoot "C:/wamp/www/another-dev-site/"

Remove the dummy virtual hosts and add:
<VirtualHost *:80>
ServerName localhost
DocumentRoot C:/wamp/www/
Restart the apache service.
Drupal – Change user edit page’s theme from admin theme (Seven)
Facebook Object ID from url of webpage
© 2023 Anil Maharjan