]> ToastFreeware Gitweb - toast/tdyndns.git/blobdiff - doc/apache2.txt
update docs after renames
[toast/tdyndns.git] / doc / apache2.txt
index b4458bebbe5e4a97cf04520f70749da8eda22cd5..db60660497cecbe39aeb303fc28020211c00838b 100644 (file)
@@ -1,17 +1,22 @@
 # Add a virtual host similar than that:
 # (e.g. in /etc/apache2/sites-available/example.com.conf)
 # Add a virtual host similar than that:
 # (e.g. in /etc/apache2/sites-available/example.com.conf)
+#
+# The Rewrite* lines are necessary to prevent mod_cgi to filter the Authorization HTTP header.
 
 <VirtualHost *:80>
   SSLEngine Off
   ServerName dyndns.example.com
   ServerAdmin webmaster@example.com
 
 <VirtualHost *:80>
   SSLEngine Off
   ServerName dyndns.example.com
   ServerAdmin webmaster@example.com
-  DocumentRoot /var/www/dyndns
-  DirectoryIndex dyndns.py
+  DocumentRoot /var/www/tdyndns
+  DirectoryIndex tdyndns.py
   ErrorLog /var/log/apache2/error.log
   CustomLog /var/log/apache2/access.log combined
   ErrorLog /var/log/apache2/error.log
   CustomLog /var/log/apache2/access.log combined
-  <Directory /var/www/dyndns>
+  <Directory /var/www/tdyndns>
       SetHandler cgi-script
       Options ExecCGI FollowSymLinks
       SetHandler cgi-script
       Options ExecCGI FollowSymLinks
+      RewriteEngine on
+      RewriteCond %{HTTP:Authorization} ^(.*)
+      RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]
   </Directory>
 </VirtualHost>
 
   </Directory>
 </VirtualHost>