Description: Cherokee is a flexible, very fast, lightweight Web server. It is implemented entirely in C, and has no dependencies beyond a standard C library. It is embeddable and extensible with plug-ins. It supports on-the-fly configuration by reading files or strings, TLS/SSL (via GNUTLS or OpenSSL), virtual hosts, authentication, cache friendly features, PHP, custom error management, and much more.
Keywords: cherokee web server httpd http

## Index → Cookbook

## Cookbook: Setting up Zend Framework

The Zend Framework is a PHP framework focused on building more secure, reliable, and modern Web 2.0 applications & web services.

It is essential that Cherokee supports PHP before starting with this recipe. That should not be a problem since it comes preconfigured by default. However, you can follow the setting up PHP recipe for further hints on fine tuning this feature.

To make sure the recipe works, we’ll be using the demo provided by the Zend Framework Quickstart. Last time this document was edited, it was demo 20090430.

Uncompress its contents to a directory and set up the `public` subdirectory as your web document root. In our example, it will be `/var/www/demo/public`.

    user@cherokee:/var/www/demo$ ls
    application  data  library  public  scripts

The `library` directory is empty and should contain the Zend Framework files. Download it from the official page and copy it to the appropriate location. Follow the Quickstart for more details on setting up the framework. We will concentrate on the Cherokee side.

So now that we have the files in place, we’ll just create the needed rules for the web server. Specially important will be the rewrite rules. From the Zend Framework

This set of rewrite rules specify that if the file exists under the document root directory, it should simply be served as a static resource. Otherwise, the request is for dynamic content and should be rewritten to our index.php script. Since all requests for non-static content will be rewritten to it, the index.php script serves as the entry point to our application.

### Configure Cherokee using the Wizard

Cherokee is shipped with a configuration `Wizard` that can be used both to deploy the application under a dedicated `Virtual Server` and under a web folder from one already existent.

Launch cherokee-admin, and proceed to the Virtual servers section.

Now you can either enter the chosen one to install under a web folder, or directly click on the `Add` button of the `Virtual Servers` panel to create a customised virtual server. In any case you will find the wizard under the `Platforms` category.

After that you will be asked for the minimal information required to correctly configure your server in a totally transparent way.

And that’s it. You are done with the configuration! You can now access your application. The demo provided by Zend will look like this:

Of course, you’ll have to follow the complete tutorial if you expect it to work as intended.