Created
September 7, 2022 23:54
-
-
Save craigderington/f9abbc4485441e9279c397ce6a38988c to your computer and use it in GitHub Desktop.
Flask App WSGI Apache Configuration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VirtualHost *:80> | |
# listen for non-www, redirect to non-www | |
ServerName domainname.com | |
Redirect permanent / http://www.domainname.com | |
</VirtualHost> | |
<VirtualHost *:80> | |
ServerName www.domainname.com | |
ServerAdmin [email protected] | |
DocumentRoot /var/www/html/sitename | |
WSGIDaemonProcess sitename user=ubuntu group=www-data threads=5 | |
WSGIScriptAlias / /var/www/html/sitename/wsgi.py | |
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn, | |
# error, crit, alert, emerg. | |
# It is also possible to configure the loglevel for particular | |
# modules, e.g. | |
#LogLevel info ssl:warn | |
ErrorLog ${APACHE_LOG_DIR}/error.log | |
CustomLog ${APACHE_LOG_DIR}/access.log combined | |
<Directory /var/www/html/geoip> | |
WSGIProcessGroup sitename | |
WSGIApplicationGroup %{GLOBAL} | |
Require all granted | |
</Directory> | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment