On 21/10/10 22:29, Roberto De Ioris wrote:
Il giorno 21/ott/2010, alle ore 12.55, David Taylor ha scritto:

Hi,

I've worked on a django project, which works fine when running with the debug 
server, but behaves strangely with Cherokee and uWSGI.

With the debug server I can successfully fetch my app's login page using the 
following URLs:

  localhost:8000/app
  localhost:8000/app/
  localhost:8000/app/login

However, when I deploy to Cherokee + uWSGI, the equivalent URLs produce 404s:

  example.com/app
  example.com/app/
  example.com/app/login

After some testing, I found that the following URLs could successfully retrieve 
my app's login page:

  example.com/app/app/
  example.com/app/app/login

Although example.com/app/app still produces a 404.

I have the following in cherokee.conf:

vserver!100!rule!600!encoder!gzip = 1
vserver!100!rule!600!handler = uwsgi
vserver!100!rule!600!handler!balancer = round_robin
vserver!100!rule!600!handler!balancer!source!1 = 31
vserver!100!rule!600!handler!check_file = 0
vserver!100!rule!600!handler!error_handler = 1
vserver!100!rule!600!handler!pass_req_headers = 1
vserver!100!rule!600!match = request
vserver!100!rule!600!match!directory = /app
Here you have mounted the app under /app but as i understand from your mail
you want the application to be under /

If you want the app to live under /app you have to set the mountpoint in the 
xml file
to /app

Your current configuration is inconsistent as you have setup cherokee to mount 
under /app
and uWSGI under /


example.com is WordPress
example.com/app1 is app1 in a Django project
example.com/app2 is app2 in a Django project
etc...

Both app1 and app2 are applications in the same Django project.

I have app1 and app2 handled by the Django project by having rules that match directories /app1 and /app2 and use the uwsgi handler.

In that situation what should the single uwsgi.xml file contain? I have tried various mountpoints. None have worked correctly.

Thanks.

Cheers,
David.
_______________________________________________
Cherokee mailing list
[email protected]
http://lists.octality.com/listinfo/cherokee

Reply via email to