From 38819aecc00d63f0dce4893bd594ba8d518bca1e Mon Sep 17 00:00:00 2001
From: David Beniamine <david.beniamine@tetras-libre.fr>
Date: Thu, 23 Dec 2021 15:08:17 +0100
Subject: [PATCH] Fix apache2 config for sympa 6.2.60

---
 docker/sympa/default.conf | 43 +++++++++++++--------------------------
 1 file changed, 14 insertions(+), 29 deletions(-)

diff --git a/docker/sympa/default.conf b/docker/sympa/default.conf
index 620239f..2e318ca 100644
--- a/docker/sympa/default.conf
+++ b/docker/sympa/default.conf
@@ -20,50 +20,35 @@
         ErrorLog ${APACHE_LOG_DIR}/error.log
         CustomLog ${APACHE_LOG_DIR}/access.log combined
 
+		<Location />
+			DirectoryIndex disabled
+			SetHandler "proxy:unix:/var/run/sympa/wwsympa.socket|fcgi://"
+			Require all granted
+		</Location>
 
 		<Location /static-sympa>
+			SetHandler none
 			Require all granted
 		</Location>
 		Alias /static-sympa /usr/share/sympa/static_content/
 
 
+		<Location /css-sympa>
+			SetHandler none
+			Require all granted
+		</Location>
 		Alias /css-sympa /var/lib/sympa/css
-		<Directory /var/lib/sympa/css>
-		Require all granted
-		</Directory>
 
+		<Location /picture-sympa>
+			SetHandler none
+			Require all granted
+		</Location>
 		Alias /pictures-sympa /var/lib/sympa/pictures
-		<Directory /var/lib/sympa/pictures>
-		Require all granted
-		</Directory>
 
 		<Location /sympasoap>
 			SetHandler "proxy:unix:/var/run/sympa/sympasoap.socket|fcgi://"
 			Require all granted
 		</Location>
-
-
-		<Location /sympa>
-			SetHandler "proxy:unix:/var/run/sympa/wwsympa.socket|fcgi://"
-			Require all granted
-		</Location>
-
-        # # Sympa pretty urls
-        # RewriteEngine on
-        # # Do not redirect static, css and pictures
-        # RewriteCond %{REQUEST_URI} !^/(static|css|pictures)-sympa/.*
-        # RewriteCond %{REQUEST_URI} !^/sympasoap.*
-        # # Avoid redirect loops
-        # RewriteCond %{REQUEST_URI} !^/sympa.*
-        # # Prepend wws
-        # RewriteRule (.*) /sympa$1 [PT,QSA]
-
-        # # Hide direct access to /wws with 307 to preserve data and method
-        # RewriteCond %{REQUEST_URI} ^/sympa.*
-        # RewriteCond %{REQUEST_URI} !^/(static|css|pictures)-sympa/.*
-        # RewriteCond %{REQUEST_URI} !^/sympasoap.*
-        # RewriteRule /sympa(.*) $1 [L,QSA,R=307]
-
 </VirtualHost>
 
 # vim: syntax=apache ts=4 sw=4 sts=4 sr noet
-- 
GitLab