Выкатил django blog,на nginx+uwsgi. И вот главная страница открывается а в админку попасть не могу.
ошибка
Not Found The requested URL /admin/ was not found on this server. django
urls.py
urlpatterns = [
url(r'^$', PostListView.as_view(), name='list'),
url(r'^(?P<slug>[-\w]+)/$', PostDetail.as_view(),name="post"),
url(r'^admin/', admin.site.urls),
url('^markdown/', include( 'django_markdown.urls')),
]
settings.py
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django_markdown',
'devel0per',
]
конфиг uwsgi
[uwsgi]
project = devel0per.space
base = /home
chdir = %(base)/www/devel0per.space
venv = DJANGO_SETTINGS_MODULE=blog_devel0per.settings
virtualenv = /home/venv/space
module = blog_devel0per.wsgi:application
#logger = file:/home/log/uwsgi.log
master = true
processes = 5
socket = 127.0.0.1:35766
vacuum = true
daemonize = /home/log/uwsgi.log
nginx config
server {
listen 80;
server_name devel0per.space;
return 301 https://$server_name$request_uri;
rewrite ^(.*) https://devel0per.space$uri permanent;
}
server {
listen 443 ssl;
server_name devel0per.space;
location /static/ {
alias /home/www/devel0per.space/static/;
}
location / {
include uwsgi_params;
uwsgi_pass 127.0.0.1:35766;
}
ssl on;
ssl_stapling on;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers kEECDH+AES128:kEECDH:kEDH:-3DES:kRSA+AES128:kEDH+3DES:DES-CBC3-SHA:!RC4:!aNULL:!eNULL:!MD5:!EXPORT:!LOW:!SEED:!CAMELLIA:!IDEA:!PSK:!SRP:!SSLv2;
ssl_certificate /etc/nginx/key/dev.crt;
ssl_certificate_key /etc/nginx/key/dev.key;
ssl_session_cache shared:SSL:2m;
ssl_session_timeout 24h;
ssl_prefer_server_ciphers on;
add_header Strict-Transport-Security "max-age=31536000;";
add_header Content-Security-Policy-Report-Only "default-src https:; script-src https: 'unsafe-eval' 'unsafe-inline'; style-src https: 'unsafe-inline'; img-src https: data:; font-src https: data:; report-uri /csp-report";
access_log /home/log/devel0per-access.log;
error_log /home/log/devel0per-error.log;
}