On Fri, Apr 02, 2010 at 06:26:02PM +0100, John Handelaar wrote:
> Hola
>
> I'm having trouble with porting a Django site, which currently uses
> apache2 and mod_python with Wordpress running at /blog/, to nginx.
>
> I have several other sites which use a fastcgi process and Django as
> the root directory in a server {} configuration but adding a Location
> directive to pass /blog/ to a different php-fastcgi server on another
> port simply results in Django catching the URI and returning a 404
> error.
>
[...]
>
> Any pointers, please?
Sounds like an nginx matching order issue. Take a look at
http://wiki.nginx.org/NginxHttpCoreModule#location :
[...]
To summarize, the order in which directives are checked is as follows:
1) Directives with the "=" prefix that match the query exactly. If found,
searching stops.
2) All remaining directives with conventional strings. If this match used
the "^~" prefix, searching stops.
3) Regular expressions, in the order they are defined in the
configuration file.
4) If #3 yielded a match, that result is used. Otherwise, the match from
#2 is used.
[...]
Regards,
Jochem Kossen
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.