How to Setup Cherokee (Webserver) with PHP5 (FastCGI) / MySQL Support in Ubuntu 12.10

Cherokee is a cross-platform feature rich and flexible, light-weight and high-performance open source Web Server/Reverse proxy server that was released under GNU (General Public License). The Cherokee project was developed using C language and was made available for all major Operating System like Linux, Mac OS X and Windows. One of the main feature of Cherokee web server is it offers graphical admin interface from where you can manage web server related tasks.

Install Cherokee Web Server in Ubuntu
Install Cherokee Web Server in Ubuntu

Cherokee Features

  1. Powerful Web interface for managing and configuring web server.
  2. Easy Web application deployment.
  3. Support for latest web technologies like PHP, FastCGI, CGI, SSI, TLS/SSL, LDAP, HTTP proxying, Content Caching, Video Streaming etc.
  4. Run on Linux, Windows, MacOS X and BSD

This article shows how to install Cherokee (Web server) on Ubuntu 12.10 Server with PHP5 (FastCGI) / MySQL Support. This article also supports older version of Ubuntu. Make sure you must be logged as root user to perform all tasks mentioned in this article.

Installing MySQL in Ubuntu 12.10

First, install MySQL support for Cherokee web server. In the middle of installation, it will be asked you to supply new MySQL root user password.

# apt-get install mysql-server mysql-client

Installing PHP5 with FastCGI in Ubuntu 12.10

Next, install PHP5 with FastCGI support for Cherokee web-server.

# apt-get install php5 php5-cgi

Configuring PHP5 for FastCGI Support

To get fastcgi support, open the file /etc/php5/cgi/php.ini.

# nano /etc/php5/cgi/php.ini

And uncomment the line cgi.fix_pathinfo=1: and save the file. See the screenshot below.

Enable FastCGI Support in Ubuntu
Enable FastCGI Support in Ubuntu

Installing Cherokee Web Server In Ubuntu 12.10

We use Cherokee own PPA (Personal Package Archive) repository, so lets add the ppa to your system and do the system update.

# add-apt-repository ppa:cherokee-webserver/ppa
# apt-get update

Once, PPA added, Open terminal with “Ctrl+Alt+T” and type command from terminal. It will ask confirmation whether you want to install Cherokee Web Server. Type ‘Yes’ to continue.

# apt-get install cheroke

One of the nice features of Cherokee Web Server of it’s Web based admin control panel from where you can manage your Web Server. Fire command ‘cherokee-admin’ it will launch one time username and password which will be use later on (Please copy password in clipboard). By default Cherokee Web Server is bind to local host ( or system IP Address (xx.xx.xx.xx) at port no 9090. In my case it would be something like

Cherokee Admin
Start Cherokee Admin

Now, Open browser and type or in address bar. When prompted supply username ‘admin‘ paste password which was copied earlier during ‘cherokee-admin’ command. This is how web interface looks like and running of Cherokee Web Server.

Cherokee Admin Interface
Welcome Page of Cherokee Admin

How to Start, Stop and check the status of Cherokee Web Server. Also to verify cherokee-admin and Web Server are running.

# /etc/init.d/cherokee status
# /etc/init.d/cherokee stop
# /etc/init.d/cherokee start
# /etc/init.d/cherokee restart
sudo netstat -antp | grep cherokee

To stop running cherokee-admin, press CTRL+C on the terminal or use the following command.

sudo killall -TERM cherokee-admin

Configuring PHP5 with FastCGI Support for Cherokee

By default PHP5 support is not enabled in Cherokee. We need to enable it manually by going to Cherokee’s admin control panel at

cherokee home
Cherokee Admin Page

Navigate to vServers, select the default vhost and then go to Behavior tab and run the Rule Management.

Select Cherokee Default Vhost
Select Cherokee Default Vhost

At the left column, you will see list of available rules. See the picture below for you reference.

cherokee Rules
Cherokee Rules

Click on the “+” icon next to Behavior tab that says “Add Behaviour Rule“.

cherokee Add Behaviour Rule
Cherokee Add Behaviour Rule

Select “Languages” from the left column, then choose PHP and hit “Add” button.

Cherokee Add PHP Support
Cherokee Add PHP Support

Next, click on the Create button in the Configuration Assistant window.

Cherokee Create PHP Support
Cherokee Create PHP Support

A new rule added to left column that says “Extensions php” with status “NON FINAL“. Click on “NON FINAL” and make it as “FINAL“.

Enable PHP Extensions in  Cherokee
Enable PHP Extensions in Cherokee

Next, at top right corner, you will see “SAVE” button, click on that to save settings.

Cherokee Save Settings
Cherokee Save Settings

Now restart the Cherokee web server to take new changes.

# /etc/init.d/cherokee restart

Next, go to vServers, under Behavior tab, you will see PHP is enabled.

Verify PHP for Cherokee
Verify PHP for Cherokee

Testing PHP5 with FastCGI Support

The default web root directory for web site is /var/www. Under this directory create a file called phpinfo.php.

# nano /var/www/phpinfo.php

Add the following lines of code it and save the file.


Next, call the file in the browser as

Cherokee Verify php info
Verify PHP with FastCGI Support

See the above figure, you will see PHP5 is enabled with FastCGI support with other per-loaded modules, but one thing is missing from the list (i.e. MySQL). We haven’t yet added the support for MySQL for PHP5. Let’s do it.

Enabling MySQL Support for PHP5

To enable MySQL support for PHP, install php5-mysql package with other important php modules that might required for your applications.

# apt-get install php5-mysql php5-gd php5-curl php-pear php5-imagick php5-memcache php5-xmlrpc php5-xsl

Next, restart the Cherokee web server.

# /etc/init.d/cherokee restart

Refresh the browser ( and search for the “mysql“, you will get a MySQL section with list of other modules.

mysql support for Cheorkee
Verify MySQL Support for Cherokee

Thats It! For more information, please visit at Cherokee Web Server.

If you liked this article, then do subscribe to email alerts for Linux tutorials. If you have any questions or doubts? do ask for help in the comments section.

If You Appreciate What We Do Here On TecMint, You Should Consider:

TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

Support Us

We are thankful for your never ending support.

3 thoughts on “How to Setup Cherokee (Webserver) with PHP5 (FastCGI) / MySQL Support in Ubuntu 12.10”

Leave a Reply to abilash Cancel reply

Have a question or suggestion? Please leave a comment to start the discussion. Please keep in mind that all comments are moderated and your email address will NOT be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.