<Directory /usr/share/gitweb>
AllowOverride None
- Allow from All
+ # Apache 2.x
+ <IfModule !mod_authz_core.c>
+ Order allow,deny
+ Allow from all
+ </IfModule>
+ # Apache 2.4
+ <IfModule mod_authz_core.c>
+ Require all granted
+ </IfModule>
</Directory>
# Version 1 (default): under /cgi-bin/gitweb.cgi address
Alias /cgi-bin/static/ /usr/share/gitweb/static/
ScriptAlias /cgi-bin/gitweb.cgi /usr/lib/cgi-bin/gitweb.cgi
<Location /cgi-bin/gitweb.cgi>
- Allow from All
+ # Apache 2.x
+ <IfModule !mod_authz_core.c>
+ Order allow,deny
+ Allow from all
+ </IfModule>
+ # Apache 2.4
+ <IfModule mod_authz_core.c>
+ Require all granted
+ </IfModule>
</Location>
-SetEnv GITWEB_CONFIG "/etc/webapps/gitweb/gitweb.conf"
+<IfModule mod_env.c>
+ SetEnv GITWEB_CONFIG "/etc/webapps/gitweb/gitweb.conf"
+</IfModule>
#
# Version 2: gitweb as a handler to whole vhost:
# DirectoryIndex gitweb.cgi
# <Location />
# Options ExecCGI
-# Allow from All
+# # Apache 2.x
+# <IfModule !mod_authz_core.c>
+# Order allow,deny
+# Allow from all
+# </IfModule>
+# # Apache 2.4
+# <IfModule mod_authz_core.c>
+# Require all granted
+# </IfModule>
# </Location>
# SetEnv GITWEB_CONFIG "/etc/webapps/gitweb/gitweb.conf"
#</VirtualHost>