The following procedure describes how to configure Zend Server for IBMi to run Zend Framework projects in a development environment, using port-based virtual hosts. The advantage of port-based virtual hosts is in the ease of running several isolated applications on the same Web server. This overall solution allows developers working on a Zend Framework project in Zend Studio to immediately test any code changes locally.
The following procedure uses instructions suitable for Zend Studio for Eclipse and the Apache bundled with Zend Server. A similar procedure with some modifications can apply for other IDEs and web servers.
|
|
|
To configure Zend Server for IBMi to run a Zend Framework application:
Listen 10089 <VirtualHost *:10089 DocumentRoot "DOCUMENT_ROOT <Directory "DOCUMENT_ROOT"> Order allow,deny Allow from all AllowOverride all </Directory> </VirtualHost>
# public/.htaccess RewriteEngine On RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] RewriteRule ^.*$ /index.php [NC,L] Note: Some web servers may ignore .htaccess files unless otherwise configured. Make sure that your web server is configured to read the .htaccess file in your public directory.
|
Your Zend Framework projects will now be accessible from a browser through: http://localhost:10089/ (the port number 10089 should be replaced with the unique port you dedicated to this virtual host). |
Apache uses a main configuration file for all its settings, typically this file is called httpd.conf or apache2.conf. The location of this file varies depending on your installation:
IBM i:
/www/zendzvr/conf/httpd.conf
|
|
|
Related Links: Working with Zend FrameworkPorts and Services Installed Components Installed Components for IBM i http://framework.zend.com - external link http://framework.zend.com - external link |
|
|
© 1999-2013 Zend Technologies, Ltd. All rights reserved.