on master help sign in
apache: reverse proxy, set `ProxyPreserveHost On`

related discussions: - https://github.com/asciimoo/searx/issues/1822 - https://github.com/asciimoo/searx/issues/1819#issuecomment-580400259 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>

commit91a55e159e09450bb25206f42cf0189c2f5476ca authorMarkus Heiser <markus.heiser@darmarit.de> dateFri 31 Jan 2020, 15:54 (7 years ago) parentcd9b877
1 file changed+12−4
utils/templates/etc/apache2/sites-available/searx.conf:filtron+12−4
utils/templates/etc/apache2/sites-available/searx.conf:filtron+12−4
@@ -1,15 +1,23 @@
11# -*- coding: utf-8; mode: apache -*-
22
3+ProxyPreserveHost On
4+
35<Location ${FILTRON_URL_PATH} >
46
57 Require all granted
6− Allow from all
7−
88 Order deny,allow
99 Deny from all
1010 #Allow from fd00::/8 192.168.0.0/16 fe80::/10 127.0.0.0/8 ::1
11+ Allow from all
12+
13+ ProxyPass http://${FILTRON_LISTEN}
14+ RequestHeader set X-Script-Name ${FILTRON_URL_PATH}
15+
16+ # In Apache it seems, that setting HTTP_HOST header direct here does have no
17+ # effect. I needed to set 'ProxyPreserveHost On' (see above). HTTP_HOST is
18+ # needed by searx to render correct *Search URL* in the *Link* box and
19+ # *saved preference*.
1120
12− ProxyPass "http://127.0.0.1:4004"
13− RequestHeader set "X-Script-Name" "${FILTRON_URL_PATH}"
21+ # RequestHeader set Host ${PUBLIC_HOST}
1422
1523</Location>