Skip to content

Instantly share code, notes, and snippets.

@mortymacs
Created June 11, 2013 08:34
Show Gist options
  • Save mortymacs/5755324 to your computer and use it in GitHub Desktop.
Save mortymacs/5755324 to your computer and use it in GitHub Desktop.
My config on Flask + Apache After serveral hours...
vim /etc/httpd/conf.d/s.conf
------------------------------
WSGISocketPrefix /var/run/wsgi
<VirtualHost *:80>
#WSGISocketPrefix /var/run/wsgi
WSGIDaemonProcess myapp user=apache group=apache threads=5
WSGIScriptAlias /myapp /var/www/html/myapp/myapp.wsgi
Alias /myapp /var/www/html/myapp
AddType text/html .py
<Directory /var/www/html/myapp>
WSGIProcessGroup myapp
WSGIApplicationGroup %{GLOBAL}
#WSGIScriptReloading On
Order deny,allow
Allow from all
</Directory>
</VirtualHost>
+++++++++++++++++++++
vim myapp.wsgi
---------------
import sys
from my_file import app as application
sys.path.insert(0,'/var/www/html/myapp/application')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment