I configured my development server this way:
Ubuntu, Apache, mod_wsgi, Python 2.6
I work on the server from another computer connected to it.
Most of the times the changes don't affect the application unless I restart Apache. In some cases the changes take effect without restarting the webserver, but after let's say 3 or 4 page loads the application might behave like it used to behave previous to the changes.
Until now I just reloaded everytime apache as I have the development server here with me, but HELL after a while got so annoying. How can I avoid this?
I can't work with the development server as I need an environment that is as close as possible as the production one.
Thanks
Django will work with any version of Apache which supports mod_wsgi. The official mod_wsgi documentation is your source for all the details about how to use mod_wsgi. You'll probably want to start with the installation and configuration documentation.
Django Configuration with Apache Web ServerDjango uses its built-in development server to run the web application. To start this server, we can use python manage.py runserver command. This command starts the server which runs on port 8000 and can be accessed at browser by entering localhost:8000.
Gunicorn is the recommended HTTP server for use with Django on Heroku (as referenced in the Procfile above). It is a pure-Python HTTP server for WSGI applications that can run multiple Python concurrent processes within a single dyno (see Deploying Python applications with Gunicorn for more information).
My suggestion is that you run the application in daemon mode. This way you won't be required to restart apache, just touch my_handler.wsgi
and the daemon will know to restart the app. The apache httpd will not be only yours (in production) so it is fair not to restart it on every update.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With