Hi Taher, Thanks for answering.
> I'm forwarding the discussion to the mailing list so that more people can > contribute to solving the problem ;) Oh sorry! My mistake. > Regarding that, I'm baffled. If not traces are being shown you must be using > the wrong binary, but it doesn't seem that way from the commands you posted. > I get hundreds of information lines with that same command, compiling in a > similar way (autogen instead of configure, since I use the SVN version): > > ./autogen.sh --prefix=/usr --sysconfdir=/etc --localstatedir=/var > --enable-beta --enable-trace Still no luck to enable trace. I removed the cherokee ubuntu package and all cherokee stuff everywhere just to be sure that there's no conflict etc. without any success (I recompile everything, got some errors if I was running `make` without `sudo`?). When I run my configure command I can clearly see that trace is enable: ============================ Install prefix /usr/local CFLAGS -g -O2 trace yes backtracing no sendfile() yes IPv6 support yes Polling method 1 epoll Polling method 2 poll Polling method 3 select Threading support yes OpenSSL support no PCRE library built-in Compatible PAM no LDAP no MySQL yes GeoIP no FFMpeg no crypt support multithread Installation dir /usr/local/bin ============================ And that's the output I get when running cherokee: sudo CHEROKEE_TRACE=all /usr/local/sbin/cherokee Cherokee Web Server 0.99.39 (Feb 2 2010): Listening on port ALL:80, TLS disabled, IPv6 enabled, using epoll, 4096 fds system limit, max. 2041 connections, caching I/O, 10 threads, 204 connections per thread, standard scheduling policy, tracing 'all' Handling Graceful Restart.. PID 4981: exited re=0 Cherokee Web Server 0.99.39 (Feb 2 2010): Listening on port ALL:80, TLS disabled, IPv6 enabled, using epoll, 4096 fds system limit, max. 2041 connections, caching I/O, 10 threads, 204 connections per thread, standard scheduling policy, tracing 'all' [15/01/2011 20:42:28.259] (error) fdpoll-epoll.c:140 - epoll_ctl: ep_fd 14, fd 3: 'Bad file descriptor' file thread.c:1734 (watch_accept_MULTI_THREAD): this should not happen PID 4981: exited re=0 > Anyway, two more tips: > 1) Since you are at it, you could as well be using the latest release. 1.0.16 > has gone a long way, and you'll have a much *much* better Cherokee-Admin. Hmm, unfortunately, that's not an option for the moment on the production server. > 2) Are you sure the document-root for the static rule is correctly set to > /www/static (either through the rule or through the vserver settings)? You > could see exactly how the rule is being matched and if you had the traces > working. OK, I found a way to make it work (maybe that's normal behavior but the doc is a little sparse on the subject). Has I said I had a default root and an other one for the static one like this: Default root: /www/media/ Root of static site: /www/static/ If I set the default root to /www/static/ (Document root under the Basic tab) and don't define an other Document Root under the Handler tab of my rule everything is fine. I just find it strange that defining an other Document Root under the Handler tab of my rule break things. Maybe it's a bug? Any thoughts? Regards Etienne > Regards > > On 14/01/11 21:38, Etienne Desautels wrote: >> Ok, I start pulling my hairs over here! >> >> I review my settings, permissions, paths, etc. and I cannot see anything >> that cause the problem. >> >> So I decided to follow your advice and use the CHEROKEE_TRACE to see what is >> going on. Unfortunately I was using the distro version of Cherokee 0.99.39 >> bundle with Ubuntu 10.04. So I downloaded the source of this version and >> compile it on my development server like this: >> ./configure --localstatedir=/var --prefix=/usr/local --sysconfdir=/etc >> --enable-trace >> make >> sudo make install >> >> Then, after that I stopped the bundle one, I start my compile version like >> that: >> sudo CHEROKEE_TRACE=all /usr/local/sbin/cherokee >> >> It's running fine but I don't get any tracing? I tried different things but >> without any success. >> >> What I'm doing wrong? Is there a possible conflict between the bundle >> version and the one I compile? >> >> >> And about my initial rule problem, is there a possibility to have more info >> on the working of "File exists", especially with "match any files"? >> >> Thanks >> >> Etienne >> >> On 2011-01-07, at 04:11, Taher Shihadeh wrote: >> >>> Your approach seems correct. >>> Make sure the File exists rule is final, though. Probably it is a minor >>> configuration issue that is messing things up. I would recommend using >>> CHEROKEE_TRACE [1] (which requires cherokee to be compiled with special >>> flags) to be able to troubleshoot exactly how the server is performing the >>> matches. >>> >>> Good luck! >>> >>> [1]: http://www.cherokee-project.com/doc/dev_debug.html >>> >>> >>> On 07/01/11 05:37, Etienne Desautels wrote: >>>> Hi, >>>> >>>> I'm trying to configure the rules of a virtual server to serve static >>>> files from a directory, but if the file requested doesn't exist I want the >>>> request to be pass to my Django app. >>>> >>>> Currently I have a virtual server with my default rule as uWSGI serving >>>> Django and 2 Directories rule serving Static Content for the media and the >>>> Django admin media. All that is working. >>>> >>>> I tried to add another rule on top of that of type File exists set to >>>> match any files with a List& Send Handler with a Document Root pointing >>>> to the directory where my static site is. But all requests are still sent >>>> to Django? >>>> >>>> Default root: /www/media/ >>>> Root of static site: /www/static/ >>>> >>>> For example, If I have theses files in my static/ directory: >>>> index.html >>>> test.html >>>> public/index.html >>>> private/ >>>> >>>> I want theses URL to serve the corresponding static files: >>>> http://mysite.com/index.html >>>> http://mysite.com/test.html >>>> http://mysite.com/public/index.html >>>> http://mysite.com/public >>>> >>>> And theses URL served by Django: >>>> http://mysite.com/other >>>> http://mysite.com/private/ >>>> http://mysite.com/some.html >>>> >>>> Is it possible? How can I achieve that? >>>> >>>> Thanks >>>> >>>> Etienne >>>> >>>> _______________________________________________ >>>> Cherokee mailing list >>>> [email protected] >>>> http://lists.octality.com/listinfo/cherokee >>> >>> -- >>> [email protected] >>> http://unixwars.com/ >>> >>> > > > -- > [email protected] > http://unixwars.com/ > > _______________________________________________ Cherokee mailing list [email protected] http://lists.octality.com/listinfo/cherokee
