From 6d5987b2e0ed967a59e44ca38de6c78db3c8a042 Mon Sep 17 00:00:00 2001 From: Daniel Powell Date: Sat, 3 Jun 2023 11:46:42 -0600 Subject: [PATCH] Update readme.md After setting up the reverse proxy for Apache per the current instructions, I received the error: "AH01144: No protocol handler was valid for the URL / (scheme 'http')". Installing proxy_http and proxy_balancer modules in addition to those listed fixed this issue. a2enmod command does not include the redundant '_module' suffix. Let's Encrypt was not able to validate certificates either automatically or manually as ABS does not respond to ACME challenges directly. Editing the virtual environment configuration to ignore proxy requests to .well-known and serving that directly from Apache allowed LE to validate the challenge instead. --- readme.md | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/readme.md b/readme.md index 8077edae..563b637c 100644 --- a/readme.md +++ b/readme.md @@ -117,9 +117,11 @@ Add this to the site config file on your Apache server after you have changed th For this to work you must enable at least the following mods using `a2enmod`: - `ssl` - - `proxy_module` - - `proxy_wstunnel_module` - - `rewrite_module` + - `proxy` + - `proxy_http` + - `proxy_balancer` + - `proxy_wstunnel` + - `rewrite` ```bash @@ -144,6 +146,26 @@ For this to work you must enable at least the following mods using `a2enmod`: ``` +Some SSL certificates like those signed by Let's Encrypt require ACME validation. To allow Let's Encrypt to write and confirm +the ACME challenge, edit your VirtualHost definition to prevent proxying traffic that queries `/.well-known` and instead +serve that directly: +```bash + + # ... + + # create the directory structure /.well-known/acme-challenges + # within DocumentRoot and give the HTTP user recursive write + # access to it. + DocumentRoot /path/to/local/directory + + ProxyPreserveHost On + ProxyPass /.well-known ! + ProxyPass / http://localhost:/ + + # ... + +``` + ### SWAG Reverse Proxy