Commit fe2e8f64 authored by Jochen Wiedmann's avatar Jochen Wiedmann Committed by David Lawrence

Bug 1121477: Support for Apache HTTPD 2.4

r=dkl,a=glob
parent 689f76e3
# Don't allow people to retrieve non-cgi executable files or our private data # Don't allow people to retrieve non-cgi executable files or our private data
<FilesMatch (\.pm|\.pl|\.tmpl|localconfig.*)$> <FilesMatch (\.pm|\.pl|\.tmpl|localconfig.*)$>
deny from all <IfModule mod_version.c>
<IfVersion <= 2.2>
Deny from all
</IfVersion>
<IfVersion > 2.2>
Require all denied
</IfVersion>
</IfModule>
<IfModule !mod_version.c>
Deny from all
</IfModule>
</FilesMatch> </FilesMatch>
Options -Indexes Options -Indexes
......
...@@ -47,7 +47,17 @@ our @EXPORT = qw( ...@@ -47,7 +47,17 @@ our @EXPORT = qw(
use constant HT_DEFAULT_DENY => <<EOT; use constant HT_DEFAULT_DENY => <<EOT;
# nothing in this directory is retrievable unless overridden by an .htaccess # nothing in this directory is retrievable unless overridden by an .htaccess
# in a subdirectory # in a subdirectory
deny from all <IfModule mod_version.c>
<IfVersion <= 2.2>
Deny from all
</IfVersion>
<IfVersion > 2.2>
Require all denied
</IfVersion>
</IfModule>
<IfModule !mod_version.c>
Deny from all
</IfModule>
EOT EOT
############### ###############
...@@ -339,11 +349,31 @@ EOT ...@@ -339,11 +349,31 @@ EOT
"$graphsdir/.htaccess" => { perms => WS_SERVE, contents => <<EOT "$graphsdir/.htaccess" => { perms => WS_SERVE, contents => <<EOT
# Allow access to .png and .gif files. # Allow access to .png and .gif files.
<FilesMatch (\\.gif|\\.png)\$> <FilesMatch (\\.gif|\\.png)\$>
Allow from all <IfModule mod_version.c>
<IfVersion <= 2.2>
Allow from all
</IfVersion>
<IfVersion > 2.2>
Require all granted
</IfVersion>
</IfModule>
<IfModule !mod_version.c>
Allow from all
</IfModule>
</FilesMatch> </FilesMatch>
# And no directory listings, either. # And no directory listings, either.
Deny from all <IfModule mod_version.c>
<IfVersion <= 2.2>
Deny from all
</IfVersion>
<IfVersion > 2.2>
Require all denied
</IfVersion>
</IfModule>
<IfModule !mod_version.c>
Deny from all
</IfModule>
EOT EOT
}, },
...@@ -352,28 +382,80 @@ EOT ...@@ -352,28 +382,80 @@ EOT
# if research.att.com ever changes their IP, or if you use a different # if research.att.com ever changes their IP, or if you use a different
# webdot server, you'll need to edit this # webdot server, you'll need to edit this
<FilesMatch \\.dot\$> <FilesMatch \\.dot\$>
Allow from 192.20.225.0/24 <IfModule mod_version.c>
Deny from all <IfVersion <= 2.2>
Allow from 192.20.225.0/24
Deny from all
</IfVersion>
<IfVersion > 2.2>
Require ip 192.20.225.0/24
Require all denied
</IfVersion>
</IfModule>
<IfModule !mod_version.c>
Allow from 192.20.225.0/24
Deny from all
</IfModule>
</FilesMatch> </FilesMatch>
# Allow access to .png files created by a local copy of 'dot' # Allow access to .png files created by a local copy of 'dot'
<FilesMatch \\.png\$> <FilesMatch \\.png\$>
Allow from all <IfModule mod_version.c>
<IfVersion <= 2.2>
Allow from all
</IfVersion>
<IfVersion > 2.2>
Require all granted
</IfVersion>
</IfModule>
<IfModule !mod_version.c>
Allow from all
</IfModule>
</FilesMatch> </FilesMatch>
# And no directory listings, either. # And no directory listings, either.
Deny from all <IfModule mod_version.c>
<IfVersion <= 2.2>
Deny from all
</IfVersion>
<IfVersion > 2.2>
Require all denied
</IfVersion>
</IfModule>
<IfModule !mod_version.c>
Deny from all
</IfModule>
EOT EOT
}, },
"$assetsdir/.htaccess" => { perms => WS_SERVE, contents => <<EOT "$assetsdir/.htaccess" => { perms => WS_SERVE, contents => <<EOT
# Allow access to .css files # Allow access to .css files
<FilesMatch \\.(css|js)\$> <FilesMatch \\.(css|js)\$>
Allow from all <IfModule mod_version.c>
<IfVersion <= 2.2>
Allow from all
</IfVersion>
<IfVersion > 2.2>
Require all granted
</IfVersion>
</IfModule>
<IfModule !mod_version.c>
Allow from all
</IfModule>
</FilesMatch> </FilesMatch>
# And no directory listings, either. # And no directory listings, either.
Deny from all <IfModule mod_version.c>
<IfVersion <= 2.2>
Deny from all
</IfVersion>
<IfVersion > 2.2>
Require all denied
</IfVersion>
</IfModule>
<IfModule !mod_version.c>
Deny from all
</IfModule>
EOT EOT
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment