I'm experimenting with developing python flask app, and would like to configure the app to apache as a daemon, so I wouldn't need to restart apache after every change. The configuration is now like instructed here:
httpd.conf
WSGIDaemonProcess /rapo threads=5 display-name=%{GROUP}
WSGIProcessGroup /rapo
WSGIScriptAlias /rapo /var/www/cgi-bin/pycgi/koe.wsgi
koe.wsgi contains just
import sys
sys.path.insert(0, "/var/www/cgi-bin/pycgi")
from koe2 import app as application
And in koe2.py there is
@app.route('/rapo')
def hello_world():
return 'Hello, World!'
that output I can see when I go to the webserver's /rapo/hello -path, so flask works, but the daemon configuration does not (I still need to restart to see any changes made). Here with similar problem it seems the key was that the names match, and they do. SW versions: Apache/2.4.6 (CentOS) PHP/5.4.16 mod_wsgi/3.4.
We don't have any virtual hosts defined in the httpd.conf, which might be the missing thing, as that worked in this case? Thanks for any help!