add vhost to zend server

General discussion forum for the Zend Server - The full, commercial edition

add vhost to zend server

Postby dquintard on Tue Feb 21, 2012 8:19 pm

Hi there,
i'd like to know how to add vhosts to zend server.

David
dquintard
 
Posts: 2
Joined: Tue Feb 21, 2012 8:18 pm

Re: add vhost to zend server

Postby dquintard on Tue Feb 21, 2012 10:37 pm

NameVirtualHost localhost:80

<VirtualHost localhost:80>
DocumentRoot "J:\ZEND\APPLICATION"
ServerName dev.app.dev
ErrorLog "logs\app.log"
</VirtualHost>

works fine
dquintard
 
Posts: 2
Joined: Tue Feb 21, 2012 8:18 pm

Re: add vhost to zend server

Postby bgmills on Sat Feb 25, 2012 12:33 am

Not so simple. I just put a new installation of Zend Server CE (5.6.0) on a newly installed Ubuntu 11.10 platform. Previouasly I was running several vhosts on Apache2 under a 5.0.x version of the Z server. In the previous installation, Apache2, httpd.conf, extras and docroot (html) were located at /usr/local/zend/apache2. It was a standard configuration so it was very strraight forward to set up httpd-vhosts.conf and point to it from httpd.conf. Then set define vhosts pointing to a vhosts folder in apache2.

In the new install of CE server, Apache2 is at etc/apache2. This folder contains an empty httpd.conf file, no extras and no public html folder. Looking at the phpenv it says that docroot is at /usr/local/zend/gui/UserServer. This folder contains an index file (Zend Framework) that launches the server from http://localhost:10081. The /usr/local/zend/gui/ folder also contains an html folder. In this folder is another index.php (also ZF) that is accessed from http://localhost:80. The later file contains a confirmation message that the server is running. This is obviously the public html folder but no clue as to how you get to this or a vhosts folder from Apache httpd.conf.

It appears that the traditional Apache config has been completely hijacked by the Z server for Zend framework. It is not at all clear how one should go about configuring virtual hosts in this scenario. That may be fine for pure ZF development but is no use whatsoever for configuring legacy vhost development sites which is what I need to do.

Can anyone please explain how this can be done under the current server release (5.6.x). Where is the real config file and where should httpd-vhosts be located? How should it be accessed?
bgmills
 
Posts: 9
Joined: Sat Jun 05, 2010 1:59 am

Re: add vhost to zend server

Postby mkherlakian_zend on Tue Feb 28, 2012 2:54 pm

You mentioned you are using Ubuntu 11.10. In that case, in /etc/apache2/ you should have 2 folders called sites-available/ and sites-enabled/. In this folder you create a file with your vhost content, then from the sites-enabled folder, create a symlink into the file you created in sites-available.

One of the goals that Zend Server set to accomplish is the use of standard packages. Therefore it uses the standard Apache configuration that the package dictates.
Here's a good article that describes the process:
http://www.control-escape.com/web/configuring-apache2-debian.html
User avatar
mkherlakian_zend
 
Posts: 88
Joined: Tue Jan 10, 2012 2:41 pm


Return to Zend Server

Who is online

Users browsing this forum: No registered users and 2 guests