Hi Johann,

I am sorry you have not found the help you need on this particular
issue. web2py is not different than any Python web framework on this
respect. There is nothing in web2py or the other frameworks that
prevent you from playing along with others, it is just that
configuration really depends on details.

I am not an apache expert and certainly not a cherokee expert but,
sticking with apache there are many ways to configure it with web2py:

- mod_wsgi (recommended but may not play well with php)
- mod_proxy (this works well under any circumstance)

You just run web2py locally

python web2py.py -a 'password' -i 127.0.0.1 -p 8000

and configure apache this way:

NameVirtualHost *:80
### deal with requests on port 80
<VirtualHost *:80>

   <Location "/welcome">
     Order deny,allow
     Allow from all
     ProxyPass http://localhost:8000/welcome
     ProxyPassReverse http://localhost:8000/
   </Location>

</VirtualHost>

This will create no compatibility problem and it is described in the
manual chapter 11. The only problem is that under heavy load you
should also configure Apache to serve static files directly.


On Jan 20, 9:43 am, Johann Spies <johann.sp...@gmail.com> wrote:
> As I am unable to get a solution to my problems serving web2py using
> apache alongside other sites I am trying out Cherokee - so far with no
> success.  I have followed the instructions in the book but this
> results in
>
> 404 Not Found
> The requested URL /welcome/default/index was not found on this server.
>
> Cherokee web server 0.99.38 (Debian GNU/Linux), Port 80
>
> In /var/log/cherokee/cherokee.error:
>
> [20/01/2010 17:34:23.171] (error) fdpoll-epoll.c:140 - epoll_ctl:
> ep_fd 13, fd 3: 'Bad file descriptor'
>
> and in /var/log/cherokee.access:
>
> ::1 - - [20/Jan/2010:17:38:13 +0200] "GET /welcome/default/index
> HTTP/1.1" 404 0 "-" "Mozilla/5.0 (X11; U; Linux x86_64; af;
> rv:1.9.1.6) Gecko/20091216 Iceweasel/3.5.6 (like Firefox/3.5.6;
> Debian-3.5.6-1)"
>
> My config file looks like this:
>
> config!version = 000099038
> server!bind!1!port = 80
> server!bind!1!tls = 0
> server!group = www-data
> server!ipv6 = 1
> server!keepalive = 1
> server!keepalive_max_requests = 500
> server!panic_action = /usr/share/cherokee/cherokee-panic
> server!pid_file = /var/run/cherokee.pid
> server!server_tokens = full
> server!timeout = 15
> server!user = www-data
> vserver!10!directory_index = index.html
> vserver!10!document_root = /var/www
> vserver!10!error_writer!filename = /var/log/cherokee/cherokee.error
> vserver!10!error_writer!type = file
> vserver!10!logger = combined
> vserver!10!logger!access!buffsize = 16384
> vserver!10!logger!access!filename = /var/log/cherokee/cherokee.access
> vserver!10!logger!access!type = file
> vserver!10!nick = default
> vserver!10!rule!500!encoder!gzip = 1
> vserver!10!rule!500!handler = server_info
> vserver!10!rule!500!handler!type = just_about
> vserver!10!rule!500!match = directory
> vserver!10!rule!500!match!directory = /about
> vserver!10!rule!400!document_root = /usr/lib/cgi-bin
> vserver!10!rule!400!handler = cgi
> vserver!10!rule!400!match = directory
> vserver!10!rule!400!match!directory = /cgi-bin
> vserver!10!rule!300!document_root = /usr/share/cherokee/themes
> vserver!10!rule!300!handler = file
> vserver!10!rule!300!match = directory
> vserver!10!rule!300!match!directory = /cherokee_themes
> vserver!10!rule!200!document_root = /usr/share/cherokee/icons
> vserver!10!rule!200!handler = file
> vserver!10!rule!200!match = directory
> vserver!10!rule!200!match!directory = /icons
> vserver!10!rule!100!encoder!deflate = 0
> vserver!10!rule!100!encoder!gzip = 0
> vserver!10!rule!100!handler = fcgi
> vserver!10!rule!100!handler!balancer = round_robin
> vserver!10!rule!100!handler!balancer!source!1 = 1
> vserver!10!rule!100!handler!change_user = 0
> vserver!10!rule!100!handler!check_file = 1
> vserver!10!rule!100!handler!error_handler = 1
> vserver!10!rule!100!handler!pass_req_headers = 1
> vserver!10!rule!100!handler!x_real_ip_access_all = 1
> vserver!10!rule!100!handler!x_real_ip_enabled = 1
> vserver!10!rule!100!handler!xsendfile = 0
> vserver!10!rule!100!match = default
> vserver!10!rule!100!no_log = 0
> vserver!10!rule!100!only_secure = 0
> source!1!env_inherited = 1
> source!1!host = /tmp/fcgi.sock
> source!1!interpreter = /var/www/web2py/startweb2py.sh
> source!1!nick = web2py
> source!1!type = interpreter
> icons!default = page_white.png
> icons!directory = folder.png
> icons!file!bomb.png = core
> icons!file!page_white_go.png = *README*
> icons!parent_directory = arrow_turn_left.png
> icons!suffix!camera.png = jpg,jpeg,jpe
> icons!suffix!cd.png = iso,ngr,cue
> icons!suffix!color_wheel.png = png,gif,xcf,bmp,pcx,tiff,tif,cdr,psd,xpm,xbm
> icons!suffix!control_play.png = bin,exe,com,msi,out
> icons!suffix!css.png = css
> icons!suffix!cup.png = java,class,jar
> icons!suffix!email.png = eml,mbox,box,email,mbx
> icons!suffix!film.png = avi,mpeg,mpe,mpg,mpeg3,dl,fli,qt,mov,movie,flv
> icons!suffix!font.png = ttf
> icons!suffix!html.png = html,htm
> icons!suffix!music.png =
> au,snd,mid,midi,kar,mpga,mpega,mp2,mp3,sid,wav,aif,aiff,aifc,gsm,m3u,wma,wax,ra,rm,ram,pls,sd2,ogg
> icons!suffix!package.png = tar,gz,bz2,zip,rar,ace,lha,Z,7z
> icons!suffix!page_white_acrobat.png = pdf
> icons!suffix!page_white_c.png = c,h,cpp
> icons!suffix!page_white_office.png = doc,ppt,xls
> icons!suffix!page_white_php.png = php
> icons!suffix!page_white_text.png = txt,text,rtf,sdw
> icons!suffix!printer.png = ps,eps
> icons!suffix!ruby.png = rb
> icons!suffix!script.png = sh,csh,ksh,tcl,tk,py,pl
>
> I have left out the mime/... lines.
>
> I am beginning to doubt the wisdom of my decision to invest a lot of
> time to learn web2py as it seems a quite difficult product to serve in
> a production environment alongside other webpages.
>
> What am I doing wrong?
>
> Regards
> Johann
-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.


Reply via email to