-2

So I have just deployed my website to my outer server. I coppied all files from my repo. I created virtualenv, database on server, created users, made migrations, migrated and ofc . Unlikely it seems that my images and css/js files are not found. Is it absolutely nessecarry necessary to install NginX (as it was told in tutorial) to get it done? On my localhost everything works fine...

Wincij
  • 121
  • 10
  • 1
    Are you using gunicorn to run the project? – Sakthi Panneerselvam Nov 26 '18 at 16:46
  • You need to give us more details of your production environment. What WSGI server are you using (uwsgi, gunicorn, mod_wsgi)? What file server are you using (apache, nginx)? Are your settings (settings.py) different (they should be because you need `DEBUG = False` on production). In which case, what are your settings for `STATIC_ROOT`? Did you `manage.py collectstatic`? – dirkgroten Nov 26 '18 at 17:21

1 Answers1

0

From what you described I have a feeling that you are trying to use development server for deploying the website. This is bad approach. You should use nginx and gunicorn.

This is good tutorial to get it done:

https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-18-04

Based on info provided it's hard to make guesses.

Adam
  • 459
  • 2
  • 17