Add mod_uwsgi instructions

Noah 9 years ago
parent c835e9ab32
commit 18ae1068e6
  1. 52

@ -2,9 +2,59 @@
Here's some tips on getting Rophako set up on Apache.
# mod\_uwsgi
For simple sites you can set it up with `mod_uwsgi` in Apache.
## Apache configuration:
<VirtualHost *:80>
WSGIDaemonProcess rophako user=www-data group=www-data threads=5 home=/home/www-data/git/rophako
WSGIScriptAlias / /home/www-data/git/rophako/app.wsgi
WSGIScriptReloading On
CustomLog /home/www-data/logs/access_log combined
ErrorLog /home/www-data/logs/error_log
<Directory /home/www-data/sites/rophako>
WSGIProcessGroup rophako
WSGIApplicationGroup %{GLOBAL}
Order allow,deny
Allow from all
## app.wsgi
A copy of `app.wsgi` is included in the git repo's root. Here it is though for reference. This assumes you're
using a Python virtualenv named "rophako":
#!/usr/bin/env python
"""WSGI runner script for the Rophako CMS."""
import sys
import os
# Add the CWD to the path.
# Use the 'rophako' virtualenv.
activate_this = os.environ['HOME']+'/.virtualenv/rophako/bin/'
execfile(activate_this, dict(__file__=activate_this))
from rophako import app as application
# vim:ft=python
# mod\_fcgid and mod\_rewrite
For I needed to set it up using `mod_fcgid` because my site has a lot
For I needed to set it up using `mod\_fcgid` because my site has a lot
of legacy URLs to old static files, so Rophako needs to serve the main website
pages and Apache needs to serve everything else.