Some of the information here may be outdated, please check the book instead
[edit]

Dear web2py people!

I have tried to get Web2py working on Cherokee Webserver http://www.cherokee-project.com/ and after a few hours it is successfu runningl! now it is Alive and kicking and performance is way a lot faster than apache!

A Brief intro about cherokee:

I have heard about this web server but i do not pay much attention until a web2py user here asked how to make web2py work under cherokee. So i tried to take a look at cherokee . After look around original site and reviews , i am blown away by it's performance benchmarks. From the benchmarks , Dynamic page performance is wayy a lot faster then apache and lighthttpd , what interesting is when multiple clients access , cherokee performance shines by 24 - 35%!!.

So i dont wait anymore. And i grab a copy of latest stable 0.9.4 and build and run. Very nice just 2.9 MB , whole server written in Pure C and ABSOLUTELY no other dependancies wow! good!

What i am again impressed is it's Admin Interface! wow ! You can Configure everything easily via its Web Admin Interface , which is written in Python and Most of the updates to options are done via AJAX , xmlhttprequest! very impressive!! And there is no restart requires for most of the changes!

A Demo is at :

web2rokee.star-nix.com

Here is step by step howto: 1) Download Cherokee http://www.cherokee-project.com/download/

2) Untar and configure then make install : /home/v3ss$ tar -xzf cherokee-0.9.4.tar.gz /home/v3ss$ cd cherokee-0.9.4 /home/v3ss/cherokee-0.9.4$ ./confgure --enable-fcgi && make /home/v3ss/cherokee-0.9.4$ make install

3) Download Web2py latest source version. unzip and place under /var/web2py/

4) start web2py once normally to auto extract default apps , then kill it.

5) start cherokee and chrokee-admin /home/v3ss$ su root@v3ss# cherokee & chrokee-admin &

6) By default chrokee admin only listens at local interface on port 9090. thats not a problem if you have full access and physical access on that machine . If thats not the case u can force it to bind to ip and port by : -b, --bind[=IP] and -p, --port=NUM or do a ssh port forward : ssh -L 9090:localhost:9090 remotehost (more secure , recommended)

7) firefox http://localhost:9090

8) If everything allrite you will get chrokee admin.

9) here comes the fun part , wirte a shell script named startweb2py.sh: root@v3ss# cat > /var/web2py/startweb2py.sh

!/bin/bash

cd /var/web2py python /var/web2py/fcgihandler.py & [PRESS ENTER] [PRESS CTRL +D]

root@v3ss# chmod a+x /var/web2py/startweb2py.sh

10) run that script : root@v3ss# ./var/web2py/startweb2py.sh

This will start web2py under FastCGI handler.

11) Lets Put this to work , in chrokee-admin web interface , click info sources . Click Info Sources

Choose Local Interpreter.

Put Belows:

Nick : web2py

Connection : /tmp/fcgi.sock

Interpereter: /var/web2py/startweb2py.sh

Click Add New

12) Click Virtual Servers, Click Default

13) Click Behavior , Under there Click default

14) Select from the list box , Choose FastCGI instead of "List and Send"

15) At the bottom , Application Server as web2py (as we created before in Info Sources)

16) Check all the CheckBoxes (Can leave Allow-x-sendfile) , if there is warning displayed , disable and enable one of the check box (it will auto re-submit application server parameter , sometimes it dosn't and its a bug)

Now Enjoy Web2py on Fastest of All Web Servers , Cherokee !! Browse http://ipaddressofyoursite , and Welcome! to web2py will appear!

© 2008-2010 by Massimo Di Pierro - All rights reserved - Powered by web2py - design derived from a theme by the earlybird
The content of this book is released under the Artistic License 2.0 - Modified content cannot be reproduced.