Answer the question
In order to leave comments, you need to log in
What's the problem with django admin?
Rolled out django blog, on nginx+uwsgi. And now the main page opens and I can not get into the admin panel.
mistake
Not Found The requested URL /admin/ was not found on this server. django
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')),
]
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django_markdown',
'devel0per',
]
[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
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;
}
Answer the question
In order to leave comments, you need to log in
you need to roll it back
, or write it in settings.py
urlpatterns = [
url(r'^admin/', include(admin.site.urls)),
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question