Skip to content

Instantly share code, notes, and snippets.

@feliphebueno
Last active January 21, 2018 20:08
Show Gist options
  • Save feliphebueno/e082783351af3b331366147d35239436 to your computer and use it in GitHub Desktop.
Save feliphebueno/e082783351af3b331366147d35239436 to your computer and use it in GitHub Desktop.
Exemplo de alterações no httpd.conf para utilização de Python 3 + Django com o Apache mod_wsgi
#rewrite module
LoadModule rewrite_module /etc/httpd/modules/mod_rewrite.so
# wsgi module
LoadModule wsgi_module /etc/httpd/modules/mod_wsgi.so
# now configure it
# Pass header Authorization into your Django App
WSGIPAssAuthorization On
WSGIPythonPath /path/to/lib/python/site-packages/
<VirtualHost *:80>
ServerName yor-domain.com
DocumentRoot "/path/to/DjangoProject"
WSGIScriptAlias / /path/to/DjangoProject/DjangoProject/wsgi.py
WSGIDaemonProcess DjangoProject display-name=%{GROUP} threads=5 maximum-requests=200 inactivity-timeout=60
WSGIProcessGroup DjangoProject
<Directory /path/to/DjangoProject/DjangoProject>
AllowOverride All
</Directory>
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment