From 1610df04a23fba8680b6b1dc3df9c69d761ac678 Mon Sep 17 00:00:00 2001 From: dakkar <dakkar@thenautilus.net> Date: Sun, 16 Mar 2025 11:41:31 +0000 Subject: [PATCH] probably better apache config the `ProxyPreserveHost` is necessary otherwise signature checks fail the `X-Forwarded-Proto` fixes the mastodon emulation (without it, it tries to talk to `http://sharkey.example` and can fail) the `ProxyPassReverse` are now the same as in my own configuration, still not sure how useful they are (they tell apache to rewrite `location` headers in responses) thanks to tauroid on Discord for noticing the problems and helping me debug the configuration --- content/en/docs/install/fresh.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/content/en/docs/install/fresh.md b/content/en/docs/install/fresh.md index 3d54876..0cce0dd 100644 --- a/content/en/docs/install/fresh.md +++ b/content/en/docs/install/fresh.md @@ -388,14 +388,21 @@ Something like this works for Apache 2.4.47 or later: ServerName sharkey.example SSLEngine On + RequestHeader set X-Forwarded-Proto "https" AllowEncodedSlashes NoDecode + ProxyPreserveHost On + ProxyPass "/" "http://127.0.0.1:3000/" upgrade=websocket + ProxyPassReverse "/" "https://sharkey.example/" + ProxyPassReverse "/" "http://127.0.0.1:3000/" + # or, if your Sharkey listens on a UNIX socket # ProxyPass "/" "unix:/opt/sharkey/sharkey.sock|http://127.0.0.1/" upgrade=websocket + # ProxyPassReverse "/" "https://sharkey.example/" + # ProxyPassReverse "/" "unix:/opt/sharkey/sharkey.sock|http://127.0.0.1/" - ProxyPassReverse / https://sharkey.example/ </VirtualHost> ``` -- GitLab