Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

69 lines (55 sloc) 2.331 kb
WSGISocketPrefix /var/run/wsgi
<VirtualHost *:80>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
<VirtualHost *:443>
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/apache.crt
SSLCertificateKeyFile /etc/apache2/ssl/apache.key
# Covering all pre-bug-702988 past-known server aliases
DirectoryIndex index.html
Options -Indexes
RewriteEngine On
DocumentRoot /var/www
<Directory "/var/www">
Options All
AllowOverride All
Order allow,deny
Allow from all
Alias /media/ "/vagrant/media/"
Alias /static/ "/vagrant/static/"
Alias /uploads/ "/home/vagrant/uploads/"
# This runs the python app through mod_wsgi
# More like prod, but requires a `touch /vagrant/wsgi/*` to refresh code
#WSGIDaemonProcess kuma processes=8 threads=1 maximum-requests=8 user=vagrant group=vagrant
#WSGIProcessGroup kuma
#WSGIScriptAlias /mwsgi "/vagrant/wsgi/kuma.wsgi"
# This runs the python app from port 8000, which must be started manually
# eg. /home/vagrant/kuma-venv/bin/python /vagrant/ runserver
TimeOut 600
ProxyTimeout 600
ProxyPass /mwsgi http://localhost:8000 retry=1
ProxyPassReverse /mwsgi http://localhost:8000
# Proxy to reach elasticsearch
ProxyPass /elastic http://localhost:9200
ProxyPassReverse /elastic http://localhost:9200
# Proxy any requests for non-existent resources under /media/uploads to the
# production site. That way, we don't need an export of files from prod for
# references in a DB export from prod.
# FIXME: This is broken right now, because production forbids any referers
# not from production for media assets. A referer-blocker addon might work
SSLProxyEngine on
RewriteCond /vagrant%{REQUEST_FILENAME} !-f
RewriteCond /vagrant%{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} /media/uploads/
RewriteRule ^/media/uploads/(.*)$$1 [P,L]
Jump to Line
Something went wrong with that request. Please try again.