Hi all,
I am facing a small issue regarding the reload of my source code change with mod_wsgi in embeded mode.
I made some changes in my code source, but those changes are not taken into account when I restart apache. I did the following with no result :
- applied a minor change in the wsgi entry file ;
- restarted the apache server.
But nothing happened. I checked apache logs and all I see is normal activity. What am I missing ?
My configurations below :
wsgi entry file :
import sys
path = '/var/www/mysite.fr/.venv_vo2/lib/python3.11/sites-packages'
if path not in sys.path:
sys.path.insert(0, path)
from mysite import create_app
application = create_app()-----------------------------------------------------------------------------------------------------------------------------
my virtualhost conf file :
<VirtualHost *:80>
ServerName mysite.fr
ServerAlias www.mysite.fr
DocumentRoot /var/www/mysite.fr/mysite/
WSGIScriptAlias / /var/www/mysite.fr/mysite/mysite.wsgi
WSGIScriptReloading On
WSGIApplicationGroup %{GLOBAL}
<Directory /var/www/mysite.fr/mysite/>
<IfVersion < 2.4>
Order allow,deny
Allow from all
</IfVersion>
<IfVersion >= 2.4>
Require all granted
</IfVersion>
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
RewriteEngine on
RewriteCond %{SERVER_NAME} =mysite.fr [OR]
RewriteCond %{SERVER_NAME} =www.mysite.fr
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
-----------------------------------------------------------------------------------------------------------
virtual host conf encrypted version :
<IfModule mod_ssl.c>
<VirtualHost *:443>
[...]
Many Thanks,
Anthony