Oh I get it. I have a few questions:

1. Wheres should I configure my nginx?

2. Is there a any problem with my project folder structure? Because I do 
have my templates outside the static folder...

├── costum
├── manage.py
├── psi
│   ├── __init__.py
│   ├── __init__.pyc
│   ├── middlewares.py
│   ├── middlewares.pyc
│   ├── __pycache__
│   ├── settings.py
│   ├── settings.pyc
│   ├── urls.py
│   ├── urls.pyc
│   ├── wsgi.py
│   └── wsgi.pyc
├── static
│   ├── bower_components
│   ├── circle-progress.js
│   ├── css
│   ├── dist
│   └── js
├── static-root
├── templates
│   ├── admin-panel
│   ├── base.html
│   ├── home.html
│   ├── renderSolution.html
│   └── runAlgorithm.html
└── teste1
    ├── admin.py
    ├── admin.pyc
    ├── algorithm.py
    ├── binariesExchange.py
    ├── binaries.py
    ├── fitness.py
    ├── __init__.py
    ├── __init__.pyc
    ├── migrations
    ├── models.py
    ├── models.pyc
    ├── __pycache__
    ├── tests.py
    └── views.py


On Monday, 4 May 2015 00:16:00 UTC+1, Mike Dewhirst wrote:
>
> 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+unsubscr...@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/a7a5ded5-d804-4bcd-9327-ec1bd385707b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to