From a543abe70261b91992e868cae9ae9891a0d1bc67 Mon Sep 17 00:00:00 2001 From: franztv82 <93776391+franztv82@users.noreply.github.com> Date: Sun, 5 Nov 2023 22:47:34 +0100 Subject: [PATCH] Added apache reverse proxy configuration --- source/admin/installation.rst | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/source/admin/installation.rst b/source/admin/installation.rst index 22ad4e0..6dd7dd2 100644 --- a/source/admin/installation.rst +++ b/source/admin/installation.rst @@ -292,8 +292,28 @@ Place the configuration in ``/etc/apache2/sites-available/helfertool.conf``. the file is also in the git repository under ``stuff/deployment/apache.conf``. Review and adapt the settings carefully. -.. note:: - This configuration example is missing, sorry! +.. code-block:: none + + ServerTokens Prod + ServerSignature Off + + + + Protocols h2 h2c http/1.1 + + ProxyPass / http://127.0.0.1:8000/ + ProxyPassReverse / http://127.0.0.1:8000/ + + ProxyPreserveHost On + ProxyAddHeaders On + RequestHeader set X-Forwarded-Proto "https" + RequestHeader set Host "YOUR_DOMAIN" + + ErrorLog ${APACHE_LOG_DIR}/error.log + CustomLog ${APACHE_LOG_DIR}/access.log combined + + + The Apache module remoteip needs to be enabled. Then activate the new vHost and if necessary disable the default vHost. @@ -304,7 +324,7 @@ Then activate the new vHost and if necessary disable the default vHost. sudo a2ensite helfertool.conf sudo a2dissite 000-default.conf # for a new apache installation - sudo a2enmod rewrite ssl headers + sudo a2enmod rewrite ssl headers proxy proxy_balancer proxy_http sudo systemctl restart apache2 First steps