When developing as usual, everything takes place on a test server, or locally. I use built-in staticfile .
However, when I transfer to a working server, and change DEBUG = False , the server crashes. Although static is already given using nginx .

Tell me what needs to be changed so that Django skips the static return step? Already tried in settings disable various static settings, nothing helped, with DEBUG = False everything crashes.

  • Tell us more about what exactly falls, and how. URL and root for statics on production are correctly configured (what really gives the nginx files, does not eliminate the need for configuration)? - ravli

1 answer 1

If the statics are incorrectly configured, the server should not fall, just a page with bare HTML will be given. This behavior can be a symptom of not ALLOWED_HOSTS = ['your-domain.ru'] in settings.py. Look, maybe Django in the logs or you wrote about it in the mail.