python - URL was not found on this server - nginx django -
i'm having trouble getting new django app render when go url. 'not found requested url /spacegame/ not found on server.' error. 'installed' app in settings.py,setup url patterns in mains urls.py , app urls.py, , created app views.py. working on django development server, not on production server. think nginx settings, not sure. appreciated. app name 'spacegame'.
main urls.py
from django.conf.urls import url, include django.contrib import admin urlpatterns = [ url(r'^$', include('homepageapp.urls')), url(r'^spacegame/', include('spacegame.urls')), url(r'^admin/', admin.site.urls) ]
spacegame.urls.py
from django.conf.urls import url . import views urlpatterns = [ url(r'^spacegame/$', views.index, name='index') ]
spacegame.views.py
from django.shortcuts import render django.http import httpresponse def index(request): return httpresponse("hello, world. you're @ spacegame index.")
nginx conf
server { listen 80; server_name ::removed:: ; return 301 https://$server_name$request_uri; root /home/projects/aar/aarcom; location = /favicon.ico { access_log off; log_not_found off; } location / { include proxy_params; proxy_pass http://unix:/home/projects/aar/aarcom/aarcom.sock; } location /static { allow all; alias /home/projects/aar/aarcom/static; } location ~ /.well-known { allow all; } }
Comments
Post a Comment