Added RewriteEngine apache2 configuration.
[toast/tdyndns.git] / doc / apache2.txt
index b4458bebbe5e4a97cf04520f70749da8eda22cd5..bfeb12fd2084c4bc16c352b8f543557300bb606a 100644 (file)
@@ -1,5 +1,7 @@
 # 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
@@ -12,6 +14,9 @@
   <Directory /var/www/dyndns>
       SetHandler cgi-script
       Options ExecCGI FollowSymLinks
+      RewriteEngine on
+      RewriteCond %{HTTP:Authorization} ^(.*)
+      RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]
   </Directory>
 </VirtualHost>