Skip to content

HTTPS clone URL

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>
<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
ServerName developer-local.allizom.org
ServerAlias developer-kumadev.mozilla.org
ServerAlias developer-mdndev.mozilla.org
ServerAlias developer-dev.mozilla.org
ServerAlias mdn-local.mozillademos.org
DirectoryIndex index.html
Options -Indexes
RewriteEngine On
DocumentRoot /var/www
<Directory "/var/www">
Options All
AllowOverride All
Order allow,deny
Allow from all
</Directory>
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/manage.py runserver 0.0.0.0:8000
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/(.*)$ https://developer.mozilla.org/media/uploads/$1 [P,L]
</VirtualHost>
Jump to Line
Something went wrong with that request. Please try again.