# 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
- 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
- <Directory /var/www/dyndns>
+ <Directory /var/www/tdyndns>
SetHandler cgi-script
Options ExecCGI FollowSymLinks
+ RewriteEngine on
+ RewriteCond %{HTTP:Authorization} ^(.*)
+ RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]
</Directory>
</VirtualHost>