Do I need to restart apache every time after changing the code?

I am deploying a Django application in webfaction. All code is loading, but sometimes there are some changes that I need to make. My workflow is editing the local file in Pycharm and synchronizing the changes on the remote server (Apache). So, for example, do I need to restart apache every time after changes to views.py so that the changes take effect?

+4
source share
2 answers

If you are using modpython yes, you need to restart apache every time, or your modules will not restart.

If you use apache and mod_wsgi, then just click on the wsgi module.

Like the other nginx + gunicorn already offered (or better nginx + uwsgi) are better options than apache + mod_python to serve your django application.

+6
source

Actually, you don’t have to, you just need to β€œtouch” the wsgi.py file (if you use the mod_wsgi apache2 module). You can do this by uploading the wsgi.py file every time you download something.

+1
source

Source: https://habr.com/ru/post/1491308/


All Articles