Source

ScraperWiki / scraperwiki.vhost

Full commit
# This is a template for creating the apache setup.
# 
# The bulk of the template is a standard mod_wsgi vhost set up.
# 
# The important part of the set up is the 'location' section. It's needed to
# enable the code running proxy that links up the FireStarter

<VirtualHost *:80>
  ServerName scraperwiki.local
  ServerAdmin webmaster@localhost
  DocumentRoot /var/www/scraperwiki/web

  WSGIScriptAlias / /var/www/scraperwiki/scraperwiki.wsgi
  
  WSGIDaemonProcess scraperwiki processes=2 threads=10
  WSGIProcessGroup scraperwiki

  
  # RewriteEngine on
  # RewriteCond %{HTTP_HOST} ^scraperwiki.com$ [NC]
  # RewriteCond %{REQUEST_URI} ^/media/(.*)
  # RewriteRule ^/media(.*)$ http://media\.scraperwiki\.com$1 [L,R=301]-


  # RewriteCond %{HTTP_HOST} ^api\.scraperwiki\.com$ [NC]
  # RewriteCond %{REQUEST_URI} !^/api.*
  # RewriteRule ^(.*)$ http://horsell.scraperwiki\.talusdesign\.co\.uk$1 [L,R=301]

    
  # Possible values include: debug, info, notice, warn, error, crit,
  # alert, emerg.
  LogLevel debug
</VirtualHost>

<VirtualHost *:80>
  ServerAdmin webmaster@media.scraperwiki.talusdesign.co.uk
  ServerName media.scraperwiki.talusdesign.co.uk
  
  ProxyRequests Off
  ProxyPreserveHost On
  ProxyPass / http://127.0.0.1:81/
  ProxyPassReverse / http://127.0.0.1:81/
  
</VirtualHost>