buy kamagra
Home » PHP, Web Developing, Zend Framework

Ubuntu rewrite rule for zend framework

8 June 2009 One Comment

Now it’s a good time to install ubuntu on your PC and to delete windows forever. It is very easy to develop serious applications with PHP Zend Framework . We suppose you are Ubuntu user, and we have a good tip for you how to create virtual host with your apache and how to point apache to proper zend framework directory.

To create rewrite rule for coding with Zend Framework you will need to configure apache virtual host for your new project, open etc/apache2/sites-enabled directory, you will see file called 000-default, this is default apache configuration file you will need to create new file called just like your project directory. For example, in your var/www/  directory you have a folder named /zendtest , created file should be called zendtest

edit this file and insert following lines , in any place I added “zendtest”, change it with your project name.

Our directory structure is just like mentioned on  Zend Framework Quick start, please visit Zend Framework website for more information.

<VirtualHost zendtest:80>
ServerAdmin webmaster@localhost
ServerName zendtest

DocumentRoot /var/www/zendtest/public
ErrorLog /var/log/apache2/mysite_error.log
CustomLog /var/log/apache2/mysite_access.log combined

# this entry is necessary to allow the virtual host to enable mod rewrite using htaccess

<Directory /var/www/zendtest/public>
Options Indexes FollowSymLinks
AllowOverride All
allow from all
</Directory>
</VirtualHost>

We hope it was helpful to start coding with zend framework, if you have any trouble, post comments, we will help you.

One Comment »

  • emeraldjava said:

    hey,

    did you have to add ‘zendtest’ to the hosts file on your machine for this to work?

Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.