[or-cvs] r12729: This is properly working vhost config for apache2. It uses m (weather/trunk)
ioerror at seul.org
ioerror at seul.org
Sun Dec 9 03:23:16 UTC 2007
Author: ioerror
Date: 2007-12-08 22:23:16 -0500 (Sat, 08 Dec 2007)
New Revision: 12729
Added:
weather/trunk/tor-weather-apache2.conf
Modified:
weather/trunk/README
Log:
This is properly working vhost config for apache2. It uses mod_rewrite for pretty urls and the non-free fastcgi (ewww). It has error logging enabled but it isn't required. -jake
Modified: weather/trunk/README
===================================================================
--- weather/trunk/README 2007-12-09 01:33:29 UTC (rev 12728)
+++ weather/trunk/README 2007-12-09 03:23:16 UTC (rev 12729)
@@ -17,6 +17,11 @@
python-flup
libapache2-mod-fastcgi (non-free archive) (we'll use something better soon)
+You may want to use our configuration file (this is a debian example):
+ cp tor-weather-apache2.conf /etc/apache2/sites-available/tor-weather
+ a2ensite tor-weather
+ /etc/init.d/apache2 reload
+
/etc/tor/torrc should be configured to enable the control port and insist upon
authentication. Plaintext control port authentication information
should be placed in config.py, along with a publicly addressable url prefix
Added: weather/trunk/tor-weather-apache2.conf
===================================================================
--- weather/trunk/tor-weather-apache2.conf (rev 0)
+++ weather/trunk/tor-weather-apache2.conf 2007-12-09 03:23:16 UTC (rev 12729)
@@ -0,0 +1,39 @@
+<VirtualHost *>
+ ServerAdmin tor-ops at torproject.org
+ ServerName weather.torproject.org
+ ServerAlias weather.torproject.org
+
+ DocumentRoot /var/www/tor-weather/
+ DirectoryIndex /weather.py/
+
+ <Directory "/var/www/tor-weather/">
+
+ # This gives us pretty and reasonable urls
+ RewriteEngine on
+ RewriteBase /
+ RewriteCond %{REQUEST_URI} !^(/.*)+weather.py/
+ RewriteRule ^(.*)$ weather.py/$1 [PT]
+
+ # Disallow .htaccess trickery
+ AllowOverride None
+ Order allow,deny
+ Allow from all
+
+ # Ensure the proper handler for weather.py
+ <Files weather.py>
+ SetHandler fastcgi-script
+ </Files>
+
+ </Directory>
+
+ ErrorLog /var/log/apache2/tor-weather-error.log
+
+ # Possible values include: debug, info, notice, warn, error, crit,
+ # alert, emerg.
+ LogLevel warn
+
+ # Don't log unless you're debugging!
+ #CustomLog /var/log/apache2/tor-weather-access.log combined
+ ServerSignature Off
+
+</VirtualHost>
More information about the tor-commits
mailing list