How to create Virtual Hosts using Zend Server CE?
I have been using Zend Server CE as my primary WAMP stack for quite a while, and i really love it. Creating virtual hosts in Zend Server CE is very easy and here is the method for:
- Suppose the Zend Server installation directory is C:\Zend. Below i will refer to the install path as INSTALLDIR.
- Open your httpd.conf file located at INSTALLDIR\Apache2\conf in a text editor, and edit the line
- Now goto the folder at C:\Windows\System32\drivers\etc and open the hosts file. If you havent yet set the permissions on this file, set it accordingly so that you can edit the file. Add the following lines:
127.0.0.1 localhost 127.0.0.1 myapp.localdev
- Open your httpd-vhosts.conf file located at INSTALLDIR\Apache2\conf\extras in a text editor. Uncomment the line (if commented)
NameVirtualHost *:80and put down the following code …
<VirtualHost *:80> DocumentRoot "C:/Zend/Apache2/htdocs" ServerName localhost </VirtualHost> <VirtualHost *:80> DocumentRoot "C:/Zend/Apache2/htdocs/myapp" ServerName myapp.localdev <directory "C:/Zend/Apache2/htdocs/myapp/"> Options Indexes FollowSymLinks AllowOverride all Order Deny,Allow Deny from all Allow from 127.0.0.1 </directory> </VirtualHost>
- Now restart the apache webserver. Now, check the urls http://localhost/and http://myapp.localdev/. If no error occurs, then you have successfully configured Virtual Hosting in Zend Server…
This entry was posted on Monday, December 27th, 2010 at 2:08 pm and is filed under Uncategorized. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.