0

How to configure a django project for production level in windows. I can't find out how to serve static and media files when DEBUG=False and how to work with gunicorn and nginx in windows. I want to test the project in production level before deploy on a web server.

Rafiul Islam
  • 393
  • 2
  • 6

1 Answers1

0

You have nginx in your pc? if you have, define STATIC_ROOT and comment/delete the STATICFILES_DIRS definition. For example:

STATIC_ROOT = os.path.join(BASE_DIR, 'static')

and in the nginx:

location /static/ {    
    autoindex on;    
    root   {your project root};    
}  
shourav
  • 946
  • 9
  • 15