view · edit · print · history

Cherokee web server with php installation


This howto explains how to install a cherokee web server with php. Also how to create virtual host. I made this howto because I m just a newbie and I spend a lot of time to make it works on my slug.

First thing,install PHP

Actually you have to download the package manually. You can find it on http://ipkg.nslu2-linux.org/feeds/openslug/oe/ Then download in the directory of your choice and install it by the "ipkg install PlaceOfPacket/nameOfPacket".

Install Cherokee

It's quiet simple to install cherokee, you juste have to run "ipkg install cherokee"

Virtual host

It's really simple to manage severals virtual host. To create a new virtual host go in your "site-available" directory (this directory should be in /etc/cherokee/ )

Now copy the example.com to the name of you website for example "name.domain.info" Here you have to make some modifications

1)Replace"Server example.com, www.example.com "---> by <--- "Server name.domain.info.com"

2)Modify the documentRoot target to your website.

3)At the end of your file you have to put also the DirectoryIndex and the Extension:

    DirectoryIndex index.php, index.html, index.htm, index.shtml
          Extension php, php3, php4 {
                          Handler phpcgi

Here is an example of my website configuration file

Server duke.duke-beer.info,www.duke-beer.info {

  DocumentRoot /home/loic/loic/website/duke

          Directory / {
                          Handler common

          ## Rest of the virtual host configuration..
          ## Add your parameters here..
          DirectoryIndex index.php, index.html, index.htm, index.shtml

          Extension php, php3, php4 {

                          Handler phpcgi


For more information you can go to the official website which is well documented.

Strange error displaying .jpg files

Cherokee version 0.5.6 fails to display JPEG files in <img> tags if files on disk have extension .jpg (all lowercase) and <img> tag on the webpage has it lowercase too. However, if extension on the webpage is changed to .Jpg, .jPg, .jpG or .JPG then image displays properly. Very annoying bug. Tested on Unslung 6.8, installed from package (ipkg install cherokee).

Other info about the strange jpg error

The problem with jpg apparently occours only with pretty large files. I writed a little web site using MS Publisher, inserting an image of myself. In the HTML code there are references to two files containing my image, one is 8k long, and the other one is 500k long. Accessing the site using MSIE, the brower tries to load the 50k version, getting a zero lenght file (answer is 200), while accessing with firefox the 8k version is correctly loaded and displayed. Changing any jpg in Jpg everything goes fine. Mail me for more info f.marra@iol.it

view · edit · print · history · Last edited by Loic Pfister.
Based on work by Franco Marra, Andrei Volkov, fcarolo, and Loic Pfister.
Originally by Loic Pfister.
Page last modified on January 23, 2008, at 01:57 PM