in my settings.py

DEBUG = False TEMPLATE_DEBUG = False ALLOWED_HOSTS = [] 

on the server when issuing 404 issues

DEBUG = True in your Django settings file. Change to False, and Django will display a standard 404 page.

The server works with Nginx, Ajenti, Django and Gunicorn. Tell me what can be done so that when I get to 404 - I get a standard error Nginx

  • you entrusted the processing of requests to your * cgi-program. where does nginx and its “standard error” come from? - aleksandr barakin

1 answer 1

 error_page 404 /404.html; 

But it works only for static folders.

The standard 404 ngnix error is in the html file, put it as a 404 django template, if you need such a page, you can use the symlink.

DEBUG = FALSE - the template will be output from the folder, if it does not work, you need to check the code on the site, it may not be overwritten, and also check that nothing below is connected, where TRUE, may be overwritten variable.