The Cherokee Project describes Cherokee as:

a very fast, flexible and easy to configure Web Server. It supports the widespread technologies nowadays: FastCGI, SCGI, PHP, CGI, uWSGI, SSI, TLS and SSL encrypted connections, Virtual hosts, Authentication, on the fly encoding, Load Balancing, Apache compatible log files, Data Base Balancing, Reverse HTTP Proxy, Traffic Shaper, Video Streaming and much more.

It makes a great alternative to the swiss-army chainsaw that is Apache and the documentation, wizards, and screencasts make it infinitely more friendly than nginx.

ISPConfig is an Open Source control panel for providing managed hosting. If your needs are simple enough, it makes a decent alternative to heavyweights such as cPanel/WHM or Parallels Plesk. In my case it makes it easier to provide virtual hosting for family members.

The thing is...

The ISPConfig installer comes with automagic support for configuring Apache and nginx, but no support for configuring Cherokee.

On top of that...

The default install of ISPConfig doesn't play well with Cherokee.

There are some very good instructions for installing ISPConfig on various distributions here, so I won't repeat them.

Also, I've previously written about installing Cherokee on Ubuntu and Debian Lenny (using the testing repository):

Once you're past that, you need to get them both to work together.

First you'll need to fire up cherokee-admin before you can configure a vServer to serve ISPConfig. The easiest way is to run the following on your server:

# cherokee-admin -b

Cherokee Web Server 1.0.10 (Nov 25 2010): Listening on port ALL:9090, TLS

disabled, IPv6 enabled, using epoll, 4096 fds system limit, max. 2041

connections, caching I/O, 20 threads, 102 connections per thread, standard

scheduling policy  


  User:              admin

  One-time Password: aryusp7DBcNZESml  

Web Interface:

  URL:               http://localhost:9090/

Note: the administration interface is now available, unencrypted, to the world on port 9090. Don't leave it this way once you're done.

Point your browser at your server on port 9090 and log in.

Cherokee Admin Login

Next, click on the vServers tab up the top and then the plus sign in the top-left corner:

Add vServer

Select Languages then PHP and click on Add:

Select Language PHP

Then click Next:

Welcome to the PHP Wizard

Enter the document root (probably /var/www/ispconfig unless you strayed from the recommended default when installing ISPConfig) and click Next:

Document Root

Enter your hostname, choose whether you want to use the same logging configuration as an existing site, then click Create:

Create New Virtual Server

Unless you have a simple Cherokee configuration and plan to keep it that way, (which, if you need ISPConfig, is unlikely), you'll want to reconfigure the Host Match tab so that your new site matches on wildcards, regular expressions or server IP. For example:

Host Match Wildcards


Add New Wildcard

Once you're done, click on SAVE in the top-right corner, followed by Graceful restart:

Save Configuration Graceful Restart

Ordinarily, you'd expect that you might be finished at this point... but you're not. If you try to visit the site now you will either get 404 (Page Not Found) or 504 (Gateway Timeout) errors.

What's going on...?

ISPConfig is typically installed in /usr/local/ispconfig and a symbolic link at /var/www/ispconfig points to a location beneath that. All the directories and files are owned by the ispconfig user and the ispconfig group with 0750 permissions. That seems to pose a problem. Although cherokee-worker and php-cgi run as www-data and www-data is a member of the ispconfig group, that does not seem to be sufficient.

Now, I admit, I got bored at this point before digging any further. Also, Cherokee is not extremely helpful when it comes to error messages and debugging. I changed the ownership of the files and directories to the www- data user and group and everything started to work. That was good enough for me. To do the same:

# chown -R www-data:www-data /usr/local/ispconfig

Try loading the site again. As long as the usual culprits are OK (eg, DNS) ISPConfig should now be working.

Caveat: these permissions might pose a problem for future upgrades to ISPConfig. Also, it's the easy way out... I became bored and gave up before figuring out exactly what was experiencing permissions problems. If you know, let me know, I'll update the post.

You should subscribe to my feed and follow me on twitter.


This entry was tagged general, ispconfig, system administration


comments powered by Disqus