WINDOWS + WAMP solution
Step 1
Go to C:wampinapacheApache2.2.17conf
open httpd.conf
file and change
#Include conf/extra/httpd-vhosts.conf
to
Include conf/extra/httpd-vhosts.conf
i.e. uncomment the line so that it can includes the virtual hosts file.
Step 2
Go to C:wampinapacheApache2.2.17confextra
and open httpd-vhosts.conf
file and add the following code
<VirtualHost myWebsite.local>
DocumentRoot "C:/wamp/www/myWebsite/"
ServerName myWebsite.local
ServerAlias myWebsite.local
<Directory "C:/wamp/www/myWebsite/">
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
change myWebsite.local
and C:/wamp/www/myWebsite/
as per your requirements.
Step 3
Open hosts
file in C:/Windows/System32/drivers/etc/
and add the following line ( Don't delete anything )
127.0.0.1 myWebsite.local
change myWebsite.local
as per your name requirements
Step 4
restart your server. That's it
WINDOWS + XAMPP solution
Same steps as that of WAMP just change the paths according to XAMPP which corresponds to path in WAMP
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…