From 727fd4a3dc198fd9cff4956b3ca1d5045de79d5f Mon Sep 17 00:00:00 2001 From: Crimekillz Date: Sat, 30 Mar 2024 23:18:56 +0100 Subject: [PATCH] Update apache example to properly support notifications and files --- docs/examples/iceshrimp.apache.conf | 44 +++++++++++++++++++++++------ locales/de-DE.yml | 1 + locales/en-US.yml | 1 + 3 files changed, 38 insertions(+), 8 deletions(-) diff --git a/docs/examples/iceshrimp.apache.conf b/docs/examples/iceshrimp.apache.conf index c0b901df7..91664567a 100644 --- a/docs/examples/iceshrimp.apache.conf +++ b/docs/examples/iceshrimp.apache.conf @@ -1,13 +1,41 @@ -# Replace example.com with your domain - +# Replace example.com with your domain and set RemoteIPInternalProxy ServerName example.com - # For WebSocket - ProxyPass "/streaming" "ws://127.0.0.1:3000/streaming/" - # Proxy to Node - ProxyPass "/" "http://127.0.0.1:3000/" - ProxyPassReverse "/" "http://127.0.0.1:3000/" + + RewriteEngine On + RewriteCond %{HTTP:Upgrade} =websocket [NC] + RewriteRule /(.*) ws://127.0.0.1:3000/$1 [P,L] + RewriteCond %{HTTP:Upgrade} !=websocket [NC] + RewriteRule /(.*) http://127.0.0.1:3000/$1 [P,L] + + # Here we define the path to the WebSocket + + ProxyPass "/streaming" "ws://127.0.0.1:3000/streaming" + ProxyPassReverse "/streaming" "ws://127.0.0.1:3000/streaming" + + ProxyRequests Off ProxyPreserveHost On - # For files proxy + + + Require all granted + + + ProxyPass / http://127.0.0.1:3000/ + ProxyPassReverse / http://127.0.0.1:3000/ + + RemoteIPHeader X-Forwarded-For + RemoteIPHeader X-Real-IP + + # Set this to the (internal) IP of your proxy server + RemoteIPInternalProxy 127.0.0.1 + + RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME} + # Uncomment this if you are using SSL + #RequestHeader set "X-Forwarded-SSL" expr=%{HTTPS} + AllowEncodedSlashes On + + + Require all granted + diff --git a/locales/de-DE.yml b/locales/de-DE.yml index 885cc518c..95f9aa388 100644 --- a/locales/de-DE.yml +++ b/locales/de-DE.yml @@ -1935,6 +1935,7 @@ _notification: followRequestAccepted: "Akzeptierte Follow-Anfragen" groupInvited: "Erhaltene Gruppeneinladungen" app: "Benachrichtigungen von Apps" + bite: "Chomps" _actions: followBack: "folgt dir nun auch" reply: "Antworten" diff --git a/locales/en-US.yml b/locales/en-US.yml index 7b0a88b8a..ec77a6372 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -2114,6 +2114,7 @@ _notification: followRequestAccepted: "Accepted follow requests" groupInvited: "Group invitations" app: "Notifications from linked apps" + bite: "Chomps" _actions: followBack: "followed you back" reply: "Reply"