Apache Web Server – Virtual host creation

Hosting the Zend Framework based application in the production environment is very simple and straight-forward. Just create a VirtualHost in the Apache configuration file and point the DocumentRoot to the Public folder of the Zend Framework application.


Eg : localhost 1degreeadmin.vivid 1dwgapi.vivid tourbeaver.vivid dctoursus.vivid venus.vivid tourbeaver.com http://www.tourbeaver.com


<VirtualHost *:80>
DocumentRoot “D:/xampp/htdocs/”
ServerName localhost

<VirtualHost *:80>
DocumentRoot “D:/xampp/htdocs/1degreeadmin”
ServerName 1degreeadmin.vivid
<VirtualHost *:80>
DocumentRoot “D:/xampp/htdocs/1dwgapi_dev”
ServerName 1dwgapi.vivid

<VirtualHost *:80>
DocumentRoot “D:/xampp/htdocs/tourbeaver_dev”
ServerName tourbeaver.vivid
<VirtualHost *:80>
DocumentRoot “D:/xampp/htdocs/dctoursus.1degreeworld.biz”
ServerName dctoursus.vivid
<VirtualHost *:80>
DocumentRoot “D:/xampp/htdocs/venus_dev”
ServerName venus.vivid


A sample configuration (myapp) is given below −

<VirtualHost *:80> 
   ServerName myapp.localhost 
   DocumentRoot /path/to/install/myapp/public 
   <Directory /path/to/install/myapp/public> 
      DirectoryIndex index.php 
      AllowOverride All 
      Order allow,deny 
      Allow from all 
      <IfModule mod_authz_core.c> 
         Require all granted 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s