Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Make server.py work out box with mod_wsgi for apache. #21

Open
tcwbot opened this issue Feb 11, 2021 · 0 comments
Open

Comments

@tcwbot
Copy link

tcwbot commented Feb 11, 2021

Thanks for this project. Works well. Below are instructions HOWTO for centos 7 and httpd (apache)

I had to add "application = app" to the bottom of server.py for this to work.
Additionally, modified index.html to use relative links for anchor tags, instead of "/". Same for for finding "filename=", to make css and javascript to work.

$ yum install python3-mod_wsgi.x86_64

[mha]# pwd
/var/www/python/mha

[mha]# tail server.py
application = app

[mha]# cat /etc/httpd/conf.d/header-analyzer.conf```

WSGIScriptAlias /mha /var/www/python/mha/server.py

WSGIDaemonProcess FlaskApp python-path=/var/www/python/mha/:/usr/local/lib/python3.6/site-packages/
WSGIProcessGroup FlaskApp

<Directory /var/www/python/mha/>
       Order allow,deny
       Allow from all
</Directory>

Alias /media/ /var/www/python/mha/media/
Alias /static/ /var/www/python/mha/static/

<Directory /var/www/python/mha/static>
       Order allow,deny
       Allow from all
</Directory>

<Directory /var/www/python/mha/media>
       Order allow,deny
       Allow from all
</Directory>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant