Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do I need to restart apache each time after changing code

I am deploying a Django app on webfaction. All code are uploaded, but sometimes there are still some modification I need to make. My workflow is edit local file in Pycharm and sync the change to remote server (Apache). So, for example, do I need to restart apache every time after changing views.py for the change to take effects?

like image 687
Philip007 Avatar asked Jul 14 '13 11:07

Philip007


People also ask

Do I need to restart Apache after changing PHP?

If you're using PHP as an Apache module for example, you need to restart apache so that the php. ini values take effect.

Does Apache restart automatically?

Logs and Monitoring in Apache If you install Apache on Windows as a service, it can be automatically restarted by the service manager if it crashes.

What happens when you restart Apache?

restart : Stops and then starts the Apache service. reload : Gracefully restarts the Apache service. On reload, the main Apache process shuts down the child processes, loads the new configuration, and starts new child processes.

Does htaccess require restart?

A restart is not required for changes to . htaccess.


1 Answers

If you are using modpython yes, you have to reload apache every time or your modules will not be reloaded.

If you are using apache and mod_wsgi then touching the wsgi module is enough.

As other already suggested nginx + gunicorn (or better nginx + uwsgi) are better options than apache + mod_python to serve your django app.

like image 132
Tommaso Barbugli Avatar answered Sep 24 '22 01:09

Tommaso Barbugli