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:

https://stackoverflow.com/questions/78778015/how-will-apache-server-mod-wsgi-will-recognize-changes-made-to-vitualhost-or-n
 
<http://StakOverflow%20question>


-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/modwsgi/252c3e0d-cef7-4456-9d95-72746555ef9bn%40googlegroups.com.

Reply via email to