Localhost
Map local IP with local domain name
Find hosts file at C:\Windows\System32\Drivers\etc
- If hosts file is editable jump directly to STEP-6
- Create a simple new.txt
- Open hosts file and copy all contents and then, paste it in new.txt
- Renamed hosts to hosts_
- Also renamed new.txt to hosts
- Now your hosts file shall be editable for adding local domain names in future
- And at the very last line in hosts file add 127.0.0.0 mapped with new local domain name(hello.loc) in a new line as shown below:
127.0.0.1 localhost
127.0.0.1 hello.loc
Note: IP with port number not allowed (127.0.0.1:8080)configure it in httpd-vhosts.conf
Allow Virtual Hosts
Find httpd.conf file at C:\wamp\bin\apache\Apache2.4.9\conf
- Open file and find line with "# Include conf/extra/httpd-vhosts.conf"
- Uncomment(remove # at the start of the line) for this particular line
- The lines shall look like# Virtual hosts
Include conf/extra/httpd-vhosts.conf
Map your Drupal Website folder with Domain Name
Find httpd-vhosts.conf file at C:\wamp\bin\apache\Apache2.4.9\conf\extra
Added below lines at the very bottom, where 8080(default is 80) is port number.
<Directory C:/wamp/www>
Order Deny,Allow
Allow from all
</Directory>
<VirtualHost *:8080>
DocumentRoot "C:/wamp/www/drupalsitefolder"
ServerName hello.loc
</VirtualHost>
Note: For drupal multisite(using one drupal code set) new <VirtualHost> is not required
Comments
Post a Comment