On 4/05/2015 6:08 AM, João Marques wrote:
> Now what happens when I run the server in "debug = False" is an error
> 500. Without the "debug = False" I get this:'Empty static prefix not
> permitted'.
Googling that error brings up a few results. It seems to indicate a
problem with STATIC_ROOT and STATIC_URL when DEBUG is true and/or
misconfiguration of Nginx when DEBUG is false.
https://docs.djangoproject.com/en/1.8/howto/static-files/#deployment
Running collectstatic drops all your static files into the STATIC_ROOT
directory on the server and that is where Nginx has to find them. The
way it works is that when a user requests a static file in a URL, Nginx
has to recognise the URL prefix to the static file named. The Nginx
config you need is to make the recognised URL prefix point to a real
location on the server (ie where collectstatic previously put the static
files)
hth
Mike
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/5546AC11.20207%40dewhirst.com.au.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment