How to Setup Cherokee Webserver with PHP5 and MySQL on Debian

Valic —  January 4, 2013 — 2 Comments

Cherokee is a high performance WebServer and is released under GNU license. Cherokee webserver is developed in C language and is available for all major distributions. Compared with all other webservers, Cherokee is having a major feature. It offers graphical admin interface for managing all tasks.

In this article I will show you how to install Cherokee on Debian with MySQL and PHP5 support.

Step1. First we need to install MySQL.
Install MySQL Server and Client using the following command:

root@cherokee:/# apt-get install mysql-server mysql-client

and follow onscreen instructions.

Step2. Install PHP5 and add FastCGI support. This is needed by Cherokee webserver.

root@cherokee:/# apt-get install php5 php5-cgi php5-mysql php5-gd php5-curl php-pear php5-imagick php5-memcache php5-xmlrpc php5-xsl

Now open /etc/php5/cgi/php.ini file and uncomment the cgi.fix_pathinfo=1 line.

Step3. Installing Cherokee Web Server in Debian:

root@cherokee:/# apt-get install cherokee

Step4. Start and configure Cherokee Admin interface.

In order to start Cherokee Admin interface you need to run the following command:

root@cherokee:/# cherokee-admin -b 10.10.10.11

NOTE: If you are not installing Cherokee WebServer on localhost you neet to bind cherokee-admin to your Ip address because by default cherokee-admin binds only to localhost.

When you run cherokee-admin it will provide you username and password.

cherokee-admin

Now you need to open your browser and access http://10.10.10.11:9090/ (replace 10.10.10.11 with your IP address) and login with username and password provided by cherokee-admin.

NOTE: To stop the control panel press CTRL+C

Step5. Enabling PHP5 with FastCGI Support In Cherokee

First log into your admin interface (http://your_ip:9090/) and go to vServers.
Next click on the default vhost and go to Behavior tab, and now click on the Rule Management.

image1

Now, on the left you should see all currently existing rules:

 

image2

Next click the NEW button to add a rule:

image3

Now select Language from the left column then choose PHP and then click ADD and Create buttons.

 

image4

image5

 

The new rule was added to left column with name Extensions php and status NON FINAL. Click on NON FINAL and it will change to FINAL:

image6image7

 

Now the only thing you need to is to save all the changes. Click on SAVE button located in the upper righ corner.

 

image8

 

Step6. Check the PHP5 configuration

The default Document Root for web site is /var/www. Here you need to create a file called phpinfo.php.

echo "" > /var/www/phpinfo.php

Then access the file from your web browser (http://your_ip/phpinfo.php) and you should see a screen like this:

image9

For more check  Cherokee Web Server.

Enjoy!

Valic

Posts Twitter Facebook

Editor in Chief at Debian-Tutorials, Linux enthusiast.

2 responses to How to Setup Cherokee Webserver with PHP5 and MySQL on Debian

  1. Chris Colvard July 10, 2013 at 16:58

    What version of Debian did you use?

  2. I used Debian Squeeze for that. It should not be different on wheezy

Leave a Reply