web2rokee! web2py + Cherokee Howto!

30 views
Skip to first unread message

Phyo Arkar

unread,
Oct 27, 2008, 3:29:56 PM10/27/08
to web...@googlegroups.com
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 a margin.

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



In next post i will explain in deails on howto web2rokee!

mdipierro

unread,
Oct 27, 2008, 4:04:59 PM10/27/08
to web2py Web Framework
Nice!

Massimo

On Oct 27, 2:29 pm, "Phyo Arkar" <phyo.arkarl...@gmail.com> wrote:
> Dear web2py people!
>
> I have tried to get Web2py working on Cherokee Webserverhttp://www.cherokee-project.com/and after a few hours it is successfu

Phyo Arkar

unread,
Oct 27, 2008, 4:48:02 PM10/27/08
to web...@googlegroups.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!


Best of Luck You all!! i b posting on AlterEgo too.

Phyo Arkar

unread,
Oct 27, 2008, 4:51:17 PM10/27/08
to web...@googlegroups.com
Eratta : for first post :

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 a margin.
cherokee Shines by Dozens , Not by a margin.


On Mon, Oct 27, 2008 at 7:29 PM, Phyo Arkar <phyo.ar...@gmail.com> wrote:

Phyo Arkar

unread,
Oct 27, 2008, 5:03:24 PM10/27/08
to web...@googlegroups.com
Massimo , Thanks.
Please try when projects are done and i am sure you will love it!.


How can i edit again in AlterEgo , it asks security code.

, i forget to add , After the final step , please make sure to click "Save and Restart"

mdipierro

unread,
Oct 27, 2008, 5:05:09 PM10/27/08
to web2py Web Framework
Could you amend it to tell cherokee to serve applications/*/static/*
files directly?

I have never tested fcgihandler.py with web2py upload and download
streaming. That needs to be tested.

Massimo

On Oct 27, 3:51 pm, "Phyo Arkar" <phyo.arkarl...@gmail.com> wrote:
> Eratta : for first post :
>
> 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 a margin.
>
> cherokee Shines by Dozens , Not by a margin.
>
> On Mon, Oct 27, 2008 at 7:29 PM, Phyo Arkar <phyo.arkarl...@gmail.com>wrote:
>
> > 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

Phyo Arkar

unread,
Oct 27, 2008, 5:18:21 PM10/27/08
to web...@googlegroups.com
Yes , it is quite easy actually.

1) Click Virtual Servers
2) Click Default
3) From the drop down box , choose Regular Expression as Rule
4) Put /*/static/*
5) It will automatically add new rule via Ajax Post
7) Then , under Behavior Select Static Content from Drop Down Box!

thats all.

Phyo Arkar

unread,
Oct 27, 2008, 5:23:48 PM10/27/08
to web...@googlegroups.com
Now Cherokee is my fav web server!! even tho i am seasoned system engineering , editing conf files online via ssh on slow connection tires me a lot! Cherokee web admin interface is so well designed in usability for configuring all aspect of the server. Damn perfect!

mdipierro

unread,
Oct 27, 2008, 5:58:34 PM10/27/08
to web2py Web Framework
We should make a vmware virtual machine with python, cherokee, web2py,
postfix and postgresql preinstalled!

Massimo

On Oct 27, 4:23 pm, "Phyo Arkar" <phyo.arkarl...@gmail.com> wrote:
> Now Cherokee is my fav web server!! even tho i am seasoned system
> engineering , editing conf files online via ssh on slow connection tires me
> a lot! Cherokee web admin interface is so well designed in usability for
> configuring all aspect of the server. Damn perfect!
>
> On Mon, Oct 27, 2008 at 9:18 PM, Phyo Arkar <phyo.arkarl...@gmail.com>wrote:
>
> > Yes , it is quite easy actually.
>
> > 1) Click Virtual Servers
> > 2) Click Default
> > 3) From the drop down box , choose Regular Expression as Rule
> > 4) Put /*/static/*
> > 5) It will automatically add new rule via Ajax Post
> > 7) Then , under Behavior Select Static Content from Drop Down Box!
>
> > thats all.
>
> > On Mon, Oct 27, 2008 at 9:05 PM, mdipierro <mdipie...@cs.depaul.edu>wrote:
>
> >> Could you amend it to tell cherokee to serve applications/*/static/*
> >> files directly?
>
> >> I have never tested fcgihandler.py with web2py upload and download
> >> streaming. That needs to be tested.
>
> >> Massimo
>
> >> On Oct 27, 3:51 pm, "Phyo Arkar" <phyo.arkarl...@gmail.com> wrote:
> >> > Eratta : for first post :
>
> >> > 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 a margin.
>
> >> > cherokee Shines by Dozens , Not by a margin.
>
> >> > On Mon, Oct 27, 2008 at 7:29 PM, Phyo Arkar <phyo.arkarl...@gmail.com
> >> >wrote:
>
> >> > > Dear web2py people!
>
> >> > > I have tried to get Web2py working on Cherokee Webserver
> >> > >http://www.cherokee-project.com/andafter a few hours it is successfu

noobpythoncoder

unread,
Oct 27, 2008, 6:17:15 PM10/27/08
to web2py Web Framework
This is AWESOME Phyo!

THANKS!

Our setup is FreeBSD + Apache + a proxy (and more, sigh) ... and
though we use SSH and Webmin to manage this, they create a LOT of side
issues eg security, poor auto-generated config statements...! Just the
thought of migrating to a better solution ... or even tweaking what
we've got now ... causes headaches here. There's just so much coding
downtime from rebuilding servers (even with imaging), we conceded to
sticking with what we've got.

My teams next headache was going to be refining load-balancing and
scaling our system to handle potential traffic spikes after our app
launch, while hoping we don't break what we've already got! I'm being
optimistic about possibly demand. ;-) You've given us hope that we
can migrate to a better server setup. Thank you so much!

I can't believe we overlooked Cherokee! It's features look hot! It's
hard to stray from the common path - but after my team using Java and
then PHP... Python and web2py have been exceptionally more rewarding
experiences for web app dev. We chose web2py because it takes the pain
out of development and has a lot of 'goodies' built right in. Cherokee
looks like it may do the same for serving web apps. This could be a
perfect match!

I'm going to set up an internal test at the end of this week. Please
keep us up-to-date with your experiments! I'll try post my ones soon.

From everyone here - you ROCK!

Noob

voltron

unread,
Oct 27, 2008, 6:22:15 PM10/27/08
to web2py Web Framework
This is great!

I have always followed Cherokees progress,the only sad thing has been
that the windows support is somewhat sketchy, I havent been able to
get the admin to show up. Have you tried load balancing?

carlo

unread,
Oct 27, 2008, 6:52:26 PM10/27/08
to web2py Web Framework
yes they promise a Windows binary version, hope I get it soon..

carlo

Tito Garrido

unread,
Oct 27, 2008, 7:52:40 PM10/27/08
to web...@googlegroups.com
Congratulations Phyo Arkar really good tutorial!


On Mon, Oct 27, 2008 at 7:52 PM, carlo <syse...@gmail.com> wrote:

yes they promise a Windows binary version, hope I get it soon..

carlo




--
Linux User #387870
.........____
.... _/_õ|__|
..º[ .-.___.-._| . . . .
.__( o)__( o).:_______

Phyo Arkar

unread,
Oct 28, 2008, 11:24:42 AM10/28/08
to web...@googlegroups.com

Dear Massimo;

Hardware Appliance / Virtual Appliance development is my speciality! I can start making one.

I have made my own live OS for spam + antivirus mail gateway, just 170 MB live OS , based on debian barebone (debian minimal).

And another custom OS is for Wireless hotspot control system, which is a captive portal.

Regards,

Phyo.

mdipierro

unread,
Oct 28, 2008, 11:33:16 AM10/28/08
to web2py Web Framework
That would be great!!!! could you make a vmware one and use the latest
ubuntu server instead of debian barebone?

Massimo

On Oct 28, 10:24 am, "Phyo Arkar" <phyo.arkarl...@gmail.com> wrote:
> Dear Massimo;
>
> Hardware Appliance / Virtual Appliance development is my speciality! I can
> start making one.
>
> I have made my own live OS for spam + antivirus mail gateway, just 170 MB
> live OS , based on debian barebone (debian minimal).
>
> And another custom OS is for Wireless hotspot control system, which is a
> captive portal.
>
> Regards,
>
> Phyo.
>
> > > >> > >http://www.cherokee-project.com/andaftera few hours it is

mdipierro

unread,
Oct 28, 2008, 11:33:48 AM10/28/08
to web2py Web Framework
BTW.... I use VMWare a lot. How does one resize the virtual HD size?

Massimo

On Oct 28, 10:24 am, "Phyo Arkar" <phyo.arkarl...@gmail.com> wrote:
> Dear Massimo;
>
> Hardware Appliance / Virtual Appliance development is my speciality! I can
> start making one.
>
> I have made my own live OS for spam + antivirus mail gateway, just 170 MB
> live OS , based on debian barebone (debian minimal).
>
> And another custom OS is for Wireless hotspot control system, which is a
> captive portal.
>
> Regards,
>
> Phyo.
>
> > > >> > >http://www.cherokee-project.com/andaftera few hours it is

Phyo Arkar

unread,
Oct 28, 2008, 12:26:31 PM10/28/08
to web...@googlegroups.com
Dear Massimo;

I like debian more , but i can make ubuntu server if you prefer.

If you use vmware-server , starting from vmware server 1.04 there is :
vmware-vdiskmanager
/usr/bin/vmware-vdiskmanager

From vmware-vdiskmanager help :
to extend vmware disk  to 36 GB
         vmware-vdiskmanager -x 36Gb myDisk.vmdk

Phyo Arkar

unread,
Oct 28, 2008, 1:57:21 PM10/28/08
to web...@googlegroups.com
Thanks a lot all!

Yeah , Cherokee simplifies the need of SSH and Webmin. I do not setup webmin due to history of multiple security vulnerabilities. With Cherokee python + ajaxed , well designed admin interface to manage whole aspect of web server , + web2py , they are the perfect match  , will be superb allies.

i will start building VMware appliance for web2rokee soon.

Massimo , what your expected features/specs for the appliances?


This is what i think of ::

  1. Autoboot DHCP
  2. CLI Configuration for system and network parameters [ what you want to have?]
  3. Web-based configuration  for system and network parameters [tell me your ideas too]
  4. Console Only ? or Minimal GUI ? or 2 versions?
  5. <200 MB

For minimal GUI only a few applications will b installed (Firefox , Xulrunner , Fluxbox or more light weight window manager )

also web2pytizens  , Put all your ideas what you want to have.

Oh forgot to mention , My Anti-virus and Anti-Spam mail gateway OS's WebConfiguration interface is in Web2py. I made this for a company in UK.


here is the full OS if you want to try. http://www.star-nix.com/LiveAVS-RC-FINAL.iso , I have attached some screens for you

Just by doing some modifications , i can convert it to web2py appliance (will b debian based).


Regards,

Phyo.
LiveAVS-WEB.png
bootscreen.png

Tito Garrido

unread,
Oct 28, 2008, 2:43:36 PM10/28/08
to web...@googlegroups.com
Very Cool! What do you use to customize os? Do you have a tutorial?

Congratulations!

mdipierro

unread,
Oct 28, 2008, 2:50:01 PM10/28/08
to web2py Web Framework
> 1. Autoboot DHCP

yes

> 2. CLI Configuration for system and network parameters [ what you want to have?]

do not know

> 3. Web-based configuration for system and network parameters [tell me your ideas too]

yes, in particular we need to be able to restart services, edit
networking parameters, possibly create/drop postgresql databases

> 4. Console Only ? or Minimal GUI ? or 2 versions?

console only

> 5. <200 MB

absolutely, the smaller the better

> also web2pytizens , Put all your ideas what you want to have.

I like "web2pycitizes". ;-)

Massimo

Phyo Arkar

unread,
Oct 28, 2008, 3:09:55 PM10/28/08
to web...@googlegroups.com

Tito , it is based on debian-lenny Minimal

i used basic building tools , -  mount, squashfs-tools , chroot , mkisofs . There is no other tools used except the script that i have written to automate the process #.

So it is actually pretty much customized linux OS from scratch.

Phyo Arkar

unread,
Oct 28, 2008, 3:13:35 PM10/28/08
to web...@googlegroups.com
>    2. CLI Configuration for system and network parameters [ what you want to have?]

When OS is just booted up there are needs to make changes before it can be accessed via web interface. SO CLI or GUI is necessary.

Attached is my LIveAVS CLI that i made in Python .

I think we better start a new topic for this.
LiveAVS-login.png

mdipierro

unread,
Oct 28, 2008, 3:14:35 PM10/28/08
to web2py Web Framework
do you use this for the virtual machines at your web hosting site?

Massimo

On Oct 28, 2:09 pm, "Phyo Arkar" <phyo.arkarl...@gmail.com> wrote:
> Tito , it is based on debian-lenny Minimal
>
> i used basic building tools , - mount, squashfs-tools , chroot , mkisofs .
> There is no other tools used except the script that i have written to
> automate the process #.
>
> So it is actually pretty much customized linux OS from scratch.
>
> On Tue, Oct 28, 2008 at 6:43 PM, Tito Garrido <titogarr...@gmail.com> wrote:
> > Very Cool! What do you use to customize os? Do you have a tutorial?
>
> > Congratulations!
>
> > On Tue, Oct 28, 2008 at 2:57 PM, Phyo Arkar <phyo.arkarl...@gmail.com>wrote:
>
> >> Thanks a lot all!
>
> >> Yeah , Cherokee simplifies the need of SSH and Webmin. I do not setup
> >> webmin due to history of multiple security vulnerabilities. With Cherokee
> >> python + ajaxed , well designed admin interface to manage whole aspect of
> >> web server , + web2py , they are the perfect match , will be superb allies.
>
> >> i will start building VMware appliance for web2rokee soon.
>
> >> Massimo , what your expected features/specs for the appliances?
>
> >> This is what i think of ::
>
> >> 1. Autoboot DHCP
> >> 2. CLI Configuration for system and network parameters [ what you want
> >> to have?]
> >> 3. Web-based configuration for system and network parameters [tell me
> >> your ideas too]
> >> 4. Console Only ? or Minimal GUI ? or 2 versions?
> >> 5. <200 MB
>
> >> For minimal GUI only a few applications will b installed (Firefox ,
> >> Xulrunner , Fluxbox or more light weight window manager )
>
> >> also web2pytizens , Put all your ideas what you want to have.
>
> >> Oh forgot to mention , My Anti-virus and Anti-Spam mail gateway OS's
> >> WebConfiguration interface is in Web2py. I made this for a company in UK.
>
> >> here is the full OS if you want to try.
> >>http://www.star-nix.com/LiveAVS-RC-FINAL.iso, I have attached some
> >> screens for you
>
> >> Just by doing some modifications , i can convert it to web2py appliance
> >> (will b debian based).
>
> >> Regards,
>
> >> Phyo.
>

Phyo Arkar

unread,
Oct 28, 2008, 3:16:42 PM10/28/08
to web...@googlegroups.com
at my web hosting i use Xen + Debian Minimal OS. So Yes , but not LiveAVS (for LiveAVS it is a live CD which act as Live SPam and Anti-Virus filtering Mail Gateway)

mdipierro

unread,
Oct 28, 2008, 3:18:51 PM10/28/08
to web2py Web Framework
It would be great is this too were in the appliance and be web based.

On Oct 28, 2:13 pm, "Phyo Arkar" <phyo.arkarl...@gmail.com> wrote:
> > 2. CLI Configuration for system and network parameters [ what you want
>
> to have?]
>
> When OS is just booted up there are needs to make changes before it can be
> accessed via web interface. SO CLI or GUI is necessary.
>
> Attached is my LIveAVS CLI that i made in Python .
>
> I think we better start a new topic for this.
>
> On Tue, Oct 28, 2008 at 6:50 PM, mdipierro <mdipie...@cs.depaul.edu> wrote:
>
> > > 1. Autoboot DHCP
>
> > yes
>
> > > 2. CLI Configuration for system and network parameters [ what you want
> > to have?]
>
> > do not know
>
> > > 3. Web-based configuration for system and network parameters [tell me
> > your ideas too]
>
> > yes, in particular we need to be able to restart services, edit
> > networking parameters, possibly create/drop postgresql databases
>
> > > 4. Console Only ? or Minimal GUI ? or 2 versions?
>
> > console only
>
> > > 5. <200 MB
>
> > absolutely, the smaller the better
>
> > > also web2pytizens , Put all your ideas what you want to have.
>
> > I like "web2pycitizes". ;-)
>
> > Massimo
>
>
>
> LiveAVS-login.png
> 11KViewDownload

Phyo Arkar

unread,
Oct 28, 2008, 3:19:33 PM10/28/08
to web...@googlegroups.com
Tito

I will document and write a tutorial while i am building Virtual Appliance for Web2py .

Phyo Arkar

unread,
Oct 28, 2008, 3:24:23 PM10/28/08
to web...@googlegroups.com
Sure , yes , from what i have learn from other Appliance type OSes , CLI is necessary.

Via CLI :

1.Modification of Network Parameters
2.Start , Stop Services
3.Reboot ,Resume system
4.Setup Root Pwd , Create User ,
5.Login to Shell.

and many others

Tito Garrido

unread,
Oct 28, 2008, 4:59:28 PM10/28/08
to web...@googlegroups.com
Thanks Phyo! I would like to learn it :)

mdipierro

unread,
Oct 28, 2008, 5:13:46 PM10/28/08
to web2py Web Framework
BTW... They have pages like this:

http://www.cherokee-project.com/doc/cookbook_django.html

perhaps you should send them an email so that can also have

http://www.cherokee-project.com/doc/cookbook_web2py.html

Massimo

On Oct 27, 4:23 pm, "Phyo Arkar" <phyo.arkarl...@gmail.com> wrote:
> Now Cherokee is my fav web server!! even tho i am seasoned system
> engineering , editing conf files online via ssh on slow connection tires me
> a lot! Cherokee web admin interface is so well designed in usability for
> configuring all aspect of the server. Damn perfect!
>
> On Mon, Oct 27, 2008 at 9:18 PM, Phyo Arkar <phyo.arkarl...@gmail.com>wrote:
>
> > Yes , it is quite easy actually.
>
> > 1) Click Virtual Servers
> > 2) Click Default
> > 3) From the drop down box , choose Regular Expression as Rule
> > 4) Put /*/static/*
> > 5) It will automatically add new rule via Ajax Post
> > 7) Then , under Behavior Select Static Content from Drop Down Box!
>
> > thats all.
>
> > On Mon, Oct 27, 2008 at 9:05 PM, mdipierro <mdipie...@cs.depaul.edu>wrote:
>
> >> Could you amend it to tell cherokee to serve applications/*/static/*
> >> files directly?
>
> >> I have never tested fcgihandler.py with web2py upload and download
> >> streaming. That needs to be tested.
>
> >> Massimo
>
> >> On Oct 27, 3:51 pm, "Phyo Arkar" <phyo.arkarl...@gmail.com> wrote:
> >> > Eratta : for first post :
>
> >> > 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 a margin.
>
> >> > cherokee Shines by Dozens , Not by a margin.
>
> >> > On Mon, Oct 27, 2008 at 7:29 PM, Phyo Arkar <phyo.arkarl...@gmail.com
> >> >wrote:
>
> >> > > Dear web2py people!
>
> >> > > I have tried to get Web2py working on Cherokee Webserver
> >> > >http://www.cherokee-project.com/andafter a few hours it is successfu

Phyo Arkar

unread,
Oct 29, 2008, 10:12:34 AM10/29/08
to web...@googlegroups.com
Dear Massimo;

I will e-mail to them. And BTW , a new version of Cherokee is out !

noobpythoncoder

unread,
Oct 30, 2008, 12:55:58 AM10/30/08
to web2py Web Framework
Perhaps we could 1-up Django someday, and offer to port/rewrite the
Cherokee Admin using web2py, with web2py integrated to run it?!

Excuse my joke... Im just too keen to try Cherokee and think it is
perfect match for web2py.

Im keen to read your tutorial Phyo - hopefully I can adapt it to
FreeBSD. :-)

Please keep up the good work Phyo and Massimo!!!

Noob

Jose

unread,
Oct 30, 2008, 8:37:48 AM10/30/08
to web2py Web Framework


On 27 oct, 20:48, "Phyo Arkar" <phyo.arkarl...@gmail.com> wrote:
> Here is step by step howto:
> 1) Download Cherokeehttp://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) firefoxhttp://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 !! Browsehttp://ipaddressofyoursite, and Welcome! to web2py will appear!
>
> Best of Luck You all!! i b posting on AlterEgo too.

Dear Phyo Arkar

I use freebsd.

Except that he(she) does not execute startweb2py (I have to execute it
manually) everything else works very well.

My file startweb2py is:
*!/bin/sh
cd/var/web2py
python/var/web2py/fcgihandler.py &

Manually I start them this way:
sh /var/web2py/startweb2py

The same thing I put in:
Info Source -> Interpreter

In that moment must execute?

Regards
Jose

mdipierro

unread,
Oct 30, 2008, 9:16:25 AM10/30/08
to web2py Web Framework
What's the name of that daemon thats starts processes, monitors them
and restarts them automatically?
Webfaction uses it.

Massimo

Phyo Arkar

unread,
Oct 30, 2008, 10:48:54 AM10/30/08
to web...@googlegroups.com
Dear Massimo;

One good , small and simple daemon that can respawn processes if it fails is monit. It is so flexible and simple , and cool.

it will monitor and alert admin if a service fails and if you set to restart , it will respawn it.
http://mmonit.com/monit/

Regards,

Phyo.

Phyo Arkar

unread,
Oct 30, 2008, 10:56:14 AM10/30/08
to web...@googlegroups.com
Dear Jose;

You mean i forgot to execute in my tutorial?
I have done that by doing ./var/web2py/startweb2py.sh


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

Or you mean ,Cherokee do not restart service automatically ?

It will depends on OS i think.

Regards,

Phyo.

Jose

unread,
Oct 31, 2008, 8:36:29 AM10/31/08
to web2py Web Framework


On 30 oct, 11:56, "Phyo Arkar" <phyo.arkarl...@gmail.com> wrote:
> Dear Jose;
>
> You mean i forgot to execute in my tutorial?
> I have done that by doing ./var/web2py/startweb2py.sh
>
> 10) run that script :
> root@v3ss# ./var/web2py/startweb2py.sh
>
> Or you mean ,Cherokee do not restart service automatically ?
>
> It will depends on OS i think.
>
> Regards,
>
> Phyo.
>

I thought that cherokee had to start it.

Why it puts in Info Sources -> Interpereter:/var/web2py/
startweb2py.sh?

Thank.
Jose

Phyo Arkar

unread,
Oct 31, 2008, 10:08:52 AM10/31/08
to web...@googlegroups.com
The interpreter is for Fail Safe purpose.

If in case web2py's FCGI handler is not started it will start it automatically.
Reply all
Reply to author
Forward
0 new messages