From 2d3588facb69c7e84ce52bb0b509b806eb273aa1 Mon Sep 17 00:00:00 2001 From: Marcin Kuzminski Date: Thu, 17 Nov 2016 15:57:15 +0100 Subject: [PATCH] docs: fix apache as subdirectory instructions. - fix HTTP flag - fix badly stated force_https usage together with proxy-prefix --- configs/development.ini | 2 +- configs/production.ini | 2 +- docs/admin/apache-subdirectory.rst | 9 +++++---- rhodecode/tests/rhodecode.ini | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/configs/development.ini b/configs/development.ini index dfc018d0..39e18458 100644 --- a/configs/development.ini +++ b/configs/development.ini @@ -91,7 +91,7 @@ asyncore_use_poll = true #timeout = 21600 -## prefix middleware for RhodeCode, disables force_https flag. +## prefix middleware for RhodeCode. ## recommended when using proxy setup. ## allows to set RhodeCode under a prefix in server. ## eg https://server.com/. Enable `filter-with =` option below as well. diff --git a/configs/production.ini b/configs/production.ini index d7680f2c..7810bef2 100644 --- a/configs/production.ini +++ b/configs/production.ini @@ -91,7 +91,7 @@ max_requests_jitter = 30 timeout = 21600 -## prefix middleware for RhodeCode, disables force_https flag. +## prefix middleware for RhodeCode. ## recommended when using proxy setup. ## allows to set RhodeCode under a prefix in server. ## eg https://server.com/custom_prefix. Enable `filter-with =` option below as well. diff --git a/docs/admin/apache-subdirectory.rst b/docs/admin/apache-subdirectory.rst index e0159fef..bd6cd574 100644 --- a/docs/admin/apache-subdirectory.rst +++ b/docs/admin/apache-subdirectory.rst @@ -7,10 +7,11 @@ Use the following example to configure Apache to use a URL prefix. .. code-block:: apache - > # Change into your chosen prefix - ProxyPass http://127.0.0.1:5000/ - ProxyPassReverse http://127.0.0.1:5000/ - SetEnvIf X-Url-Scheme https HTTPS=1 + / # Change into your chosen prefix + ProxyPreserveHost On + ProxyPass "http://127.0.0.1:5000/" + ProxyPassReverse "http://127.0.0.1:5000/" + Header set X-Url-Scheme https env=HTTPS In addition to the regular Apache setup you will need to add the following diff --git a/rhodecode/tests/rhodecode.ini b/rhodecode/tests/rhodecode.ini index 65ef0006..3b283d80 100644 --- a/rhodecode/tests/rhodecode.ini +++ b/rhodecode/tests/rhodecode.ini @@ -150,7 +150,7 @@ asyncore_use_poll = true ## how many workers should be spawned at a time #cheaper-step = 1 -## prefix middleware for RhodeCode, disables force_https flag. +## prefix middleware for RhodeCode. ## recommended when using proxy setup. ## allows to set RhodeCode under a prefix in server. ## eg https://server.com/. Enable `filter-with =` option below as well.