Rewriting Base URL when passing
António P. P. Almeida
appa at perusio.net
Wed Feb 15 17:44:58 UTC 2012
On 15 Fev 2012 17h32 WET, wtymdjs at gmail.com wrote:
> I'm trying to setup Django through UWSGI using Nginx.
>
> I got the UWSGI pass to work using this function
>
> location / {
> include uwsgi_params;
> uwsgi_pass 127.0.0.1:9001;
> }
> Unfortunately when I visit /django/admin. I get an error
>
> Page not found (404) Request Method: GET Request URL:
> http://69.x.x.x/django/admin Using the URLconf defined in
> Django.urls, Django tried these URL patterns, in this order: ^admin/
>
> How can I have nginx rewrite the url to not pass the /django part?
Mind you, my knowledge of django is within the neighborhood of
0. Probably the easiest way is just to "rewrite" the uwsgi parameters
so that the django part is not passed.
I have yet to try uWSGI :(
--- appa
More information about the nginx
mailing list