Related to using mod_wsgi-express as development server read:
http://blog.dscpl.com.au/2015/05/using-modwsgi-express-as-development.html
<http://blog.dscpl.com.au/2015/05/using-modwsgi-express-as-development.html>
http://blog.dscpl.com.au/2015/04/using-modwsgi-express-with-django.html
<http://blog.dscpl.com.au/2015/04/using-modwsgi-express-with-django.html>
http://blog.dscpl.com.au/2015/04/integrating-modwsgi-express-as-django.html
<http://blog.dscpl.com.au/2015/04/integrating-modwsgi-express-as-django.html>
Graham
> On 11 Jun 2017, at 7:27 AM, Graham Dumpleton <[email protected]>
> wrote:
>
> BTW, if this is just for development, use mod_wsgi-express instead and run it
> from the command line. It has a --reload-on-changes option which enables the
> automatic code reloading.
>
> https://pypi.python.org/pypi/mod_wsgi
> <https://pypi.python.org/pypi/mod_wsgi>
>
> Graham
>
>> On 11 Jun 2017, at 7:26 AM, Graham Dumpleton <[email protected]
>> <mailto:[email protected]>> wrote:
>>
>> Do not use MaxRequestsPerChild. That affects embedded mode and is a bad idea
>> for various reasons.
>>
>> What you want is:
>>
>>
>> http://modwsgi.readthedocs.io/en/develop/user-guides/reloading-source-code.html#monitoring-for-code-changes
>>
>> <http://modwsgi.readthedocs.io/en/develop/user-guides/reloading-source-code.html#monitoring-for-code-changes>
>>
>> This should only be used in development, never in production.
>>
>> There is a maximum-requests option to WSGIDaemonProcess, but again do not
>> recommend it, use the code change monitor.
>>
>> Graham
>>
>>> On 11 Jun 2017, at 7:22 AM, Jaqen Nki <[email protected]
>>> <mailto:[email protected]>> wrote:
>>>
>>> hey, is there easy way to avoid constant 'sudo service apache2 restart'
>>> for every code change in my project? its really redundant. Im using
>>> embedded mode to be able to dev multiple sites if needed. I tried
>>> nginx/gunicorn config but found apache to be way smoother for some reason
>>> (was getting lots of 503 bad gateways on nginx and slower loads). I had a
>>> read of this,
>>> https://code.google.com/archive/p/modwsgi/wikis/ReloadingSourceCode.wiki
>>> <https://code.google.com/archive/p/modwsgi/wikis/ReloadingSourceCode.wiki>,
>>> it appears there is no appropriate solution. even in daemon mode you have
>>> to run a command to touch the wsgi script file, which is almost the same as
>>> running sudo command. it gets quite tiresome. one stack article suggests
>>> same issue remains with gunicorn/nginx config. since im the only one user
>>> on the site, I could use max requests = 1 as a temporary solution for dev,
>>> correct. Following docs here I did not see this line in apache config file
>>> at /etc/apache2/apache2.conf.
>>>
>>> MaxRequestsPerChild 1
>>>
>>>
>>> So Is this correct? :
>>>
>>> <VirtualHost *:80>
>>> ServerName djang0.me <http://djang0.me/>
>>> WSGIDaemonProcess djang0 python-home=/var/www/djang0/
>>> venv python-path=/var/www/djang0/djang0 maximum-requests=1
>>> WSGIProcessGroup djang0
>>> WSGIApplicationGroup %{GLOBAL}
>>> WSGIScriptAlias / /var/www/djang0/djang0/djang0/wsgi.py
>>> etc etc....
>>
>>
>>
>
--
You received this message because you are subscribed to the Google Groups
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.