I am using Apache Server with mod_wsgi for hosting my python django applications. Versions: Python 3.9.18 Server version: Apache/2.4.57 mod-wsgi==4.7.1
One of my application virtual host configuration with two different versions:
#Students Webservice Config
Listen 9002 <VirtualHost *:9002>
ServerName test.myapp.com
ErrorLog /var/log/webservice_error.log
WSGIPassAuthorization On
WSGIDaemonProcess Tes9002 python-path=/home/uoadmin/releases/1.0.0/students:/home/admin/releases/1.0.0/shared display-name=%{GROUP}
WSGIProcessGroup Tes9002
WSGIApplicationGroup %{GLOBAL}
WSGIScriptAlias / /home/admin/releases/1.0.0/students/conf/wsgi.py
<Directory /home/admin/releases/1.0.0/students/conf>
<Files wsgi.py> Require all granted </Files>
</Directory>
</VirtualHost>
<VirtualHost *:9002>
ServerName dev.myapp.com
ErrorLog /var/log/webservice_error.log
WSGIPassAuthorization On
WSGIDaemonProcess Dev9002 python- path=/home/uoadmin/releases/1.1.0/students:/home/admin/releases/1.1.0/shared display-name=%{GROUP}
WSGIProcessGroup Dev9002
WSGIApplicationGroup %{GLOBAL}
WSGIScriptAlias / /home/admin/releases/1.1.0/students/conf/wsgi.py
<Directory /home/admin/releases/1.1.0/students/conf>
<Files wsgi.py> Require all granted </Files>
</Directory>
</VirtualHost>
So, When the source code is modified I can referesh the wsgi daemon using touch /home/uoadmin/releases/1.1.0/students/conf/wsgi.py touch /home/uoadmin/releases/1.0.0/students/conf/wsgi.py But when I added new virtualhost to the above configuration file or else when I modify above file the apache server unable to recognize modifications made the existing virtualhost or newly added virtualhost until doing apachectl graceful (or) apachectl restart (or) systemctl reload httpd but all the commands above killing the ongoing requests forcefully directly terminating them.
How to handle above situation.
I want to know how will apache server recognize modifications to virtualhost or newly added virtual host without reloading or restarting.
If above is not possible then is there anyway for restarting or reloading apache server gracefully that is without terminating or killing other ongoing requests or daemons while using apache server + mod_wsgi for serving python with django?
reload and restart gracefully are not working for mod_wsgi that is they are forcefully killing other processing daemons`.
I also posted this on stackoverflow:
On 23 Jul 2024, at 4:09 PM, RajKumar Ambadipelli <arkki...@gmail.com> wrote:
I am using Apache Server with mod_wsgi for hosting my python django applications. Versions: Python 3.9.18 Server version: Apache/2.4.57 mod-wsgi==4.7.1
One of my application virtual host configuration with two different versions:
...
So, When the source code is modified I can referesh the wsgi daemon using touch /home/uoadmin/releases/1.1.0/students/conf/wsgi.py touch /home/uoadmin/releases/1.0.0/students/conf/wsgi.py But when I added new virtualhost to the above configuration file or else when I modify above file the apache server unable to recognize modifications made the existing virtualhost or newly added virtualhost until doing apachectl graceful (or) apachectl restart (or) systemctl reload httpd but all the commands above killing the ongoing requests forcefully directly terminating them.
How to handle above situation.
I want to know how will apache server recognize modifications to virtualhost or newly added virtual host without reloading or restarting.
If above is not possible then is there anyway for restarting or reloading apache server gracefully that is without terminating or killing other ongoing requests or daemons while using apache server + mod_wsgi for serving python with django?
--
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 modwsgi+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/modwsgi/d28663bc-a143-4e4f-949d-38e065c5ac9fn%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/modwsgi/1fffb2f7-ed8a-4d88-a52b-00e7e82e98d5n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/modwsgi/27697b57-c903-4881-bddd-691060d62b47n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/modwsgi/0794a799-7f70-4d68-affe-b2b7a4f43529n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/modwsgi/7edb7907-915b-41a6-a581-097ea1b87dc0n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/modwsgi/618674de-ba2c-49df-8df9-10db6624df7fn%40googlegroups.com.
![]() | |
![]() | |
![]() | |
To view this discussion on the web visit https://groups.google.com/d/msgid/modwsgi/f08337f6-63a6-4fc4-a630-f437187b2b2en%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/modwsgi/7433c99a-c564-4a3c-8474-349200543159n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/modwsgi/90ce4557-9566-433b-89e7-056e12f500b2n%40googlegroups.com.
On 8 Aug 2024, at 3:25 PM, RajKumar Ambadipelli <arkki...@gmail.com> wrote:
What I am trying to do is my current virtualhost configuration is
To view this discussion on the web visit https://groups.google.com/d/msgid/modwsgi/50dde05f-044e-4bc1-8968-6e2247e125c4n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/modwsgi/f5b53cc9-1ee3-4964-a88f-cabf39ca814cn%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/modwsgi/5e6d0daf-eb7b-471c-89f7-4fba0f265a20n%40googlegroups.com.