On Mar 21, 12:04 pm, Malcolm Tredinnick <malc...@pointy-stick.com>
wrote:
> On Fri, 2009-03-20 at 20:47 -0400, Jack Orenstein wrote:
> > I'm running Django 1.02 and my application is running with the  
> > development server. I'm trying to move it over to Apache2 + wsgi.
>
> > Here is my httpd.conf setup for wsgi:
>
> >      LoadModule wsgi_module modules/mod_wsgi.so
> >      WSGIScriptAlias /foobar/ "/var/www/html/foobar/wsgi_handler.py"
> >      WSGIDaemonProcess foobar user=apache group=apache processes=1  
> > threads=10
> >      WSGIProcessGroup foobar
> >      <Directory "/var/www/html/foobar">
> >          Order allow,deny
> >          Allow from all
> >      </Directory>
>
> > This isn't in a virtual host. My domain is geophile.com and I want my  
> > foobar application to be reachable at geophile.com/foobar.
>
> > When I go to geophile.com/foobar I get a 404 page:
>
> >      Page not found (404)
> >      Request Method:       GET
> >      Request URL:  http://geophile.com/
> >      Using the URLconf defined in foobar.urls, Django tried these URL  
> > patterns, in this order:
> >      ^foobar/
> >      The current URL, , didn't match any of these.
>
> > What am I doing wrong?
>
> You've said that the script alias is /foobar/, which means that portion
> is used by the webserver to determine where to dispatch things (it's the
> SCRIPT_NAME portion in the CGI / web server lingo). Django only sees the
> stuff *after* the script name (the remainder being PATH_INFO).
>
> So Django is being passed "/", not "/foobar"
>
> Although, this does suggest we need to fix that error message, since the
> "Request URL" line is wrong, although, in this case, it did suggest to
> me what the problem is (we do host name + PATH_INFO there, apparently).

In other words, you don't need the /foobar prefix on patterns in
urls.py.

Graham
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to