Home » » Virtual Host

Virtual Host

Written By 1 on Wednesday, April 10, 2013 | 10:28 PM

How to set up virtual host?



Suppose,
http://localhost will access to all the projects in the file,
http://zf11.localhost will access to only one project and also set the document_path upto that's public folder

Please take the backup of files, before alter to avoid any issue further.


Do the Following simple steps,

1)  Tell the system, what to do when called http://zf11.localhost
FilePath: C:\Windows\System32\drivers\etc\hosts
Add the Following, in above file
127.0.0.1   localhost
127.0.0.1   zf11.localhost

2) Tell the apache, to include extra file
FilePath: C:\wamp\bin\apache\Apache2.2.17\conf\http.conf
Uncomment the following line
Include conf/extra/httpd-vhosts.conf

3) Tell the apache, what to do when request come from http://zf11.localhost
FilePath: C:\wamp\bin\apache\Apache2.2.17\conf\extra\conf\extra\httpd-vhosts.conf
Add the following line,  in the end
<Directory C:/wamp/www/zf1_11/public>
Order Deny,Allow
Allow from all
</Directory>

<VirtualHost *:80>  
    DocumentRoot "C:/wamp/www/zf1_11/public"
    ServerName zf11.localhost
    ServerAlias zf11.localhost  
</VirtualHost>










http://www.kristengrote.com/blog/articles/how-to-set-up-virtual-hosts-using-wamp
http://forum.wampserver.com/read.php?2,111881

0 Comment:

Post a Comment