I'm running nginx 0.8.44, and I have two uwsgi (0.9.5.4) instances. One for my Django site, the other is running Trac.

I have Django setup as location / { ... }, and Trac is location /trac { ... }
But When I go to http://mysite/trac, it gives Trac the /trac part of the url. So I basically get a 404 because Trac is looking for a url under it's root that is /trac. The page it goes to says

Error: Not Found
No handler matched request to /trac

And the CSS stylesheets aren't working on that page. But the typical parts of Trac are there like the "View Tickets" and "Wiki" links.

But if I change Trac's location to /, it works perfectly. Is there some way in either nginx or uwsgi to not send the "location" part of the url to application? This also happens to Django if it's location isn't /.

I was previously using Apache with mod_wsgi, and it was able to do this without any fuss.