Erlang Mailing Lists

Author Message

<  Yaws mailing list  ~  FastCGI front-end to Django

Guest
Posted: Tue Sep 22, 2009 7:45 pm Reply with quote
Guest
I thought I'd try out Ozgur's wiki recipe for using Yaws as a FastCGI
front-end for Django, and I already have a Django site running this way
behind Apache.

I have run into an odd-looking issue though. While I get a page back
nice and quick, it's always the *same* page. Where I have one page at /
and another at /foo/, the latter always returns the same data as the
former. I don't get any errors, but it's like Django isn't getting the
rest of the path. The same requests on another port to the Apache
instance work as I'd expect. Any ideas?

Tim

--
"There's no trick to being a humorist when you have the whole
government working for you."
--Will Rogers

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post received from mailinglist
Guest
Posted: Thu Sep 24, 2009 7:02 pm Reply with quote
Guest
OK, I found the source of my problem. Django looks for a SCRIPT_URL
parameter, which Apache will set if mod_rewrite is being used. While
not really a YAWS issue, I was receiving the front (default) page for
every request. Django takes a settings parameter (FORCE_SCRIPT_NAME = '')
which fixes this when using YAWS in front.

I haven't added this to the wiki entry at
http://wiki.github.com/klacke/yaws/run-django-under-yaws, perhaps
someone with an ID on github could do so.

In any case, my digging into the FastCGI protocol, packets and various
source code was most enlightening. <grin>

Cheers,
Tim

--
I have an existential map. It has "You are here" written all over it.
-- Steven Wright

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post received from mailinglist

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum