Config updates for xenial
authorAlex Dehnert <alex@dehnerts.com>
Sun, 5 May 2019 08:40:54 +0000 (04:40 -0400)
committerAlex Dehnert <alex@dehnerts.com>
Sun, 5 May 2019 08:40:54 +0000 (04:40 -0400)
14 files changed:
conf-available/gitweb.conf
conf-available/security.conf
mods-available/authnz_fcgi.load [new file with mode: 0644]
mods-available/authz_svn.load
mods-available/dav_svn.load
mods-available/php5.conf [deleted file]
mods-available/php5.load [deleted file]
mods-available/php7.0.conf [new file with mode: 0644]
mods-available/php7.0.load [new file with mode: 0644]
mods-available/proxy_html.conf [new file with mode: 0644]
mods-enabled/php5.conf [deleted symlink]
mods-enabled/php5.load [deleted symlink]
mods-enabled/php7.0.conf [new symlink]
mods-enabled/php7.0.load [new symlink]

index 8055f9d8de7fcbecba17642793da038ac2589068..cb914bcffd02b78049e047e0c4e836ff2be0f481 100644 (file)
@@ -1,6 +1,19 @@
-Alias /gitweb /usr/share/gitweb
+<IfModule mod_alias.c>
+  <IfModule mod_mime.c>
+    <IfModule mod_cgi.c>
+      Define ENABLE_GITWEB
+    </IfModule>
+    <IfModule mod_cgid.c>
+      Define ENABLE_GITWEB
+    </IfModule>
+  </IfModule>
+</IfModule>
 
-<Directory /usr/share/gitweb>
-  Options FollowSymLinks ExecCGI
-  AddHandler cgi-script .cgi
-</Directory>
+<IfDefine ENABLE_GITWEB>
+  Alias /gitweb /usr/share/gitweb
+
+  <Directory /usr/share/gitweb>
+    Options +FollowSymLinks +ExecCGI
+    AddHandler cgi-script .cgi
+  </Directory>
+</IfDefine>
index 599333b144b8e5dc5a6ad76d1988ad21a9d22186..f9f69d4917703cc3d1409d4f99194b6b79f48dea 100644 (file)
@@ -7,8 +7,7 @@
 #
 #<Directory />
 #   AllowOverride None
-#   Order Deny,Allow
-#   Deny from all
+#   Require all denied
 #</Directory>
 
 
diff --git a/mods-available/authnz_fcgi.load b/mods-available/authnz_fcgi.load
new file mode 100644 (file)
index 0000000..69d757c
--- /dev/null
@@ -0,0 +1 @@
+LoadModule authnz_fcgi_module /usr/lib/apache2/modules/mod_authnz_fcgi.so
index 2e466fd856bd6b7ef1433b2f4adc2921add956a9..c6df2733b512ffaf92c41eae9ed8169063dc0b23 100644 (file)
@@ -1,2 +1,5 @@
 # Depends: dav_svn
+<IfModule !mod_dav_svn.c>
+    Include mods-enabled/dav_svn.load
+</IfModule>
 LoadModule authz_svn_module /usr/lib/apache2/modules/mod_authz_svn.so
index 68e1e0c4f4edba2b611ac77c1ee5e4327a8dda1b..e41e1581a27f6ab80f2fd3803ecba0da1030c74b 100644 (file)
@@ -1,2 +1,7 @@
 # Depends: dav
-LoadModule dav_svn_module /usr/lib/apache2/modules/mod_dav_svn.so
+<IfModule !mod_dav_svn.c>
+    <IfModule !mod_dav.c>
+        Include mods-enabled/dav.load
+    </IfModule>
+    LoadModule dav_svn_module /usr/lib/apache2/modules/mod_dav_svn.so
+</IfModule>
diff --git a/mods-available/php5.conf b/mods-available/php5.conf
deleted file mode 100644 (file)
index 6eced76..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-<FilesMatch ".+\.ph(p[345]?|t|tml)$">
-    SetHandler application/x-httpd-php
-</FilesMatch>
-<FilesMatch ".+\.phps$">
-    SetHandler application/x-httpd-php-source
-    # Deny access to raw php sources by default
-    # To re-enable it's recommended to enable access to the files
-    # only in specific virtual host or directory
-    Order Deny,Allow
-    Deny from all
-</FilesMatch>
-# Deny access to files without filename (e.g. '.php')
-<FilesMatch "^\.ph(p[345]?|t|tml|ps)$">
-    Order Deny,Allow
-    Deny from all
-</FilesMatch>
-
-# Running PHP scripts in user directories is disabled by default
-# 
-# To re-enable PHP in user directories comment the following lines
-# (from <IfModule ...> to </IfModule>.) Do NOT set it to On as it
-# prevents .htaccess files from disabling it.
-#<IfModule mod_userdir.c>
-#    <Directory /home/*/public_html>
-#        php_admin_flag engine Off
-#    </Directory>
-#</IfModule>
diff --git a/mods-available/php5.load b/mods-available/php5.load
deleted file mode 100644 (file)
index 653695f..0000000
+++ /dev/null
@@ -1 +0,0 @@
-LoadModule php5_module /usr/lib/apache2/modules/libphp5.so
diff --git a/mods-available/php7.0.conf b/mods-available/php7.0.conf
new file mode 100644 (file)
index 0000000..05161a2
--- /dev/null
@@ -0,0 +1,25 @@
+<FilesMatch ".+\.ph(p[3457]?|t|tml)$">
+    SetHandler application/x-httpd-php
+</FilesMatch>
+<FilesMatch ".+\.phps$">
+    SetHandler application/x-httpd-php-source
+    # Deny access to raw php sources by default
+    # To re-enable it's recommended to enable access to the files
+    # only in specific virtual host or directory
+    Require all denied
+</FilesMatch>
+# Deny access to files without filename (e.g. '.php')
+<FilesMatch "^\.ph(p[3457]?|t|tml|ps)$">
+    Require all denied
+</FilesMatch>
+
+# Running PHP scripts in user directories is disabled by default
+# 
+# To re-enable PHP in user directories comment the following lines
+# (from <IfModule ...> to </IfModule>.) Do NOT set it to On as it
+# prevents .htaccess files from disabling it.
+<IfModule mod_userdir.c>
+    <Directory /home/*/public_html>
+        #php_admin_flag engine Off
+    </Directory>
+</IfModule>
diff --git a/mods-available/php7.0.load b/mods-available/php7.0.load
new file mode 100644 (file)
index 0000000..55c2a49
--- /dev/null
@@ -0,0 +1,2 @@
+# Conflicts: php5
+LoadModule php7_module /usr/lib/apache2/modules/libphp7.0.so
diff --git a/mods-available/proxy_html.conf b/mods-available/proxy_html.conf
new file mode 100644 (file)
index 0000000..14692ad
--- /dev/null
@@ -0,0 +1,75 @@
+# Configuration example.
+#
+# For detailed information about these directives see
+# <URL:http://httpd.apache.org/docs/2.4/mod/mod_proxy_html.html>
+# and for mod_xml2enc see
+# <URL:http://httpd.apache.org/docs/2.4/mod/mod_xml2enc.html>
+#
+
+# All knowledge of HTML links has been removed from the mod_proxy_html
+# code itself, and is instead read from httpd.conf (or included file)
+# at server startup.  So you MUST declare it.  This will normally be
+# at top level, but can also be used in a <Location>.
+#
+# Here's the declaration for W3C HTML 4.01 and XHTML 1.0
+
+ProxyHTMLLinks a               href
+ProxyHTMLLinks area            href
+ProxyHTMLLinks link            href
+ProxyHTMLLinks img             src longdesc usemap
+ProxyHTMLLinks object          classid codebase data usemap
+ProxyHTMLLinks q               cite
+ProxyHTMLLinks blockquote      cite
+ProxyHTMLLinks ins             cite
+ProxyHTMLLinks del             cite
+ProxyHTMLLinks form            action
+ProxyHTMLLinks input           src usemap
+ProxyHTMLLinks head            profile
+ProxyHTMLLinks base            href
+ProxyHTMLLinks script          src for
+
+# To support scripting events (with ProxyHTMLExtended On),
+# you'll need to declare them too.
+
+ProxyHTMLEvents        onclick ondblclick onmousedown onmouseup \
+               onmouseover onmousemove onmouseout onkeypress \
+               onkeydown onkeyup onfocus onblur onload \
+               onunload onsubmit onreset onselect onchange
+
+# If you need to support legacy (pre-1998, aka "transitional") HTML or XHTML,
+# you'll need to uncomment the following deprecated link attributes.
+# Note that these are enabled in earlier mod_proxy_html versions
+#
+# ProxyHTMLLinks       frame           src longdesc
+# ProxyHTMLLinks       iframe          src longdesc
+# ProxyHTMLLinks       body            background
+# ProxyHTMLLinks       applet          codebase
+#
+# If you're dealing with proprietary HTML variants,
+# declare your own URL attributes here as required.
+#
+# ProxyHTMLLinks       myelement       myattr otherattr
+#
+###########
+# EXAMPLE #
+###########
+#
+# To define the URL /my-gateway/ as a gateway to an appserver with address
+# http://some.app.intranet/ on a private network, after loading the
+# modules and including this configuration file:
+#
+# ProxyRequests Off  <-- this is an important security setting
+# ProxyPass /my-gateway/ http://some.app.intranet/
+# <Location /my-gateway/>
+#      ProxyPassReverse /
+#      ProxyHTMLEnable On
+#      ProxyHTMLURLMap http://some.app.intranet/ /my-gateway/
+#      ProxyHTMLURLMap / /my-gateway/
+# </Location>
+#
+# Many (though not all) real-life setups are more complex.
+#
+# See the documentation at
+# http://apache.webthing.com/mod_proxy_html/
+# and the tutorial at
+# http://www.apachetutor.org/admin/reverseproxies
diff --git a/mods-enabled/php5.conf b/mods-enabled/php5.conf
deleted file mode 120000 (symlink)
index ce1dd2e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../mods-available/php5.conf
\ No newline at end of file
diff --git a/mods-enabled/php5.load b/mods-enabled/php5.load
deleted file mode 120000 (symlink)
index dae39ce..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../mods-available/php5.load
\ No newline at end of file
diff --git a/mods-enabled/php7.0.conf b/mods-enabled/php7.0.conf
new file mode 120000 (symlink)
index 0000000..11c4a99
--- /dev/null
@@ -0,0 +1 @@
+../mods-available/php7.0.conf
\ No newline at end of file
diff --git a/mods-enabled/php7.0.load b/mods-enabled/php7.0.load
new file mode 120000 (symlink)
index 0000000..58e0a2f
--- /dev/null
@@ -0,0 +1 @@
+../mods-available/php7.0.load
\ No newline at end of file