From 89f8c948d7b39314d7fc997643874adc6be92462 Mon Sep 17 00:00:00 2001
From: Guilhem Moulin <guilhem@fripost.org>
Date: Thu, 22 Aug 2019 00:30:11 +0200
Subject: Use /run for the listening socket of the webserver component.

---
 snippets/apache2.conf | 2 +-
 snippets/nginx.conf   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

(limited to 'snippets')

diff --git a/snippets/apache2.conf b/snippets/apache2.conf
index 20bf2ad..e1d56a9 100644
--- a/snippets/apache2.conf
+++ b/snippets/apache2.conf
@@ -5,7 +5,7 @@
 # non-ssl one) of each virtual host requiring authorization.
 
 <Location /.well-known/acme-challenge/>
-  ProxyPass unix:///var/run/lacme-www.socket|http://localhost/.well-known/acme-challenge/
+  ProxyPass unix:///run/lacme-www.socket|http://localhost/.well-known/acme-challenge/
   Order allow,deny
   Allow from all
 </Location>
diff --git a/snippets/nginx.conf b/snippets/nginx.conf
index 981bdc3..86592d2 100644
--- a/snippets/nginx.conf
+++ b/snippets/nginx.conf
@@ -6,7 +6,7 @@
 
 location ^~ /.well-known/acme-challenge/ {
     # Pass ACME requests to lacme's webserver component
-    proxy_pass http://unix:/var/run/lacme-www.socket;
+    proxy_pass http://unix:/run/lacme-www.socket;
 
     ## Alternatively, you can let nginx serve the requests by
     ## setting 'challenge-directory' to '/var/www/acme-challenge' in
-- 
cgit v1.2.3


From d9946b9ab478026defed364485d970b4041e1a2a Mon Sep 17 00:00:00 2001
From: Guilhem Moulin <guilhem@fripost.org>
Date: Mon, 3 Aug 2020 22:39:29 +0200
Subject: Adapt Apache2 snippet to Apache2 2.4.

---
 snippets/apache2.conf | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

(limited to 'snippets')

diff --git a/snippets/apache2.conf b/snippets/apache2.conf
index e1d56a9..c42a9fb 100644
--- a/snippets/apache2.conf
+++ b/snippets/apache2.conf
@@ -6,7 +6,6 @@
 
 <Location /.well-known/acme-challenge/>
   ProxyPass unix:///run/lacme-www.socket|http://localhost/.well-known/acme-challenge/
-  Order allow,deny
-  Allow from all
+  Require all granted
 </Location>
 
-- 
cgit v1.2.3


From da8b727f156d23553eecb90e8731d39c6027cb02 Mon Sep 17 00:00:00 2001
From: Guilhem Moulin <guilhem@fripost.org>
Date: Tue, 4 Aug 2020 00:00:58 +0200
Subject: Makefile: Use variables for target directories etc.

---
 snippets/apache2.conf | 2 +-
 snippets/nginx.conf   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

(limited to 'snippets')

diff --git a/snippets/apache2.conf b/snippets/apache2.conf
index c42a9fb..45d7c7f 100644
--- a/snippets/apache2.conf
+++ b/snippets/apache2.conf
@@ -5,7 +5,7 @@
 # non-ssl one) of each virtual host requiring authorization.
 
 <Location /.well-known/acme-challenge/>
-  ProxyPass unix:///run/lacme-www.socket|http://localhost/.well-known/acme-challenge/
+  ProxyPass unix://@@runstatedir@@/lacme-www.socket|http://localhost/.well-known/acme-challenge/
   Require all granted
 </Location>
 
diff --git a/snippets/nginx.conf b/snippets/nginx.conf
index 86592d2..6775489 100644
--- a/snippets/nginx.conf
+++ b/snippets/nginx.conf
@@ -6,7 +6,7 @@
 
 location ^~ /.well-known/acme-challenge/ {
     # Pass ACME requests to lacme's webserver component
-    proxy_pass http://unix:/run/lacme-www.socket;
+    proxy_pass http://unix:@@runstatedir@@/lacme-www.socket;
 
     ## Alternatively, you can let nginx serve the requests by
     ## setting 'challenge-directory' to '/var/www/acme-challenge' in
-- 
cgit v1.2.3