Configuration problem: request default 15.15.15.15/ not working

Reinis Rozitis r at roze.lv
Tue Sep 25 08:14:15 UTC 2018


> but https://15.15.15.15/ throw error "Not found: The requested URL / was not
> found on this server. ", And I can not find the error. This is the
> configuration:
> and urls.py django:
> 
> urlpatterns = [
>     path('', RedirectView.as_view(url='/inicio/', permanent=True)),
>     path('inicio/', include('inicio.urls')),
>     path('admin/', admin.site.urls),
> ]


The error is coming from your py script and it actually tells what is the problem - the '/' url is not handled, so you probably need to add:

path('/', RedirectView.as_view(url='/inicio/', permanent=True)),

or location = / {} redirect in nginx.

rr



More information about the nginx mailing list