From d171fcd56ea0444598c6ae6d6d089dd2488bd64d Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Tue, 21 Jan 2020 18:38:57 +0100 Subject: utils/searx.sh: add apache site searx.conf:uwsgi Signed-off-by: Markus Heiser --- .../etc/apache2/sites-available/searx.conf:uwsgi | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 utils/templates/etc/apache2/sites-available/searx.conf:uwsgi (limited to 'utils/templates/etc/apache2') diff --git a/utils/templates/etc/apache2/sites-available/searx.conf:uwsgi b/utils/templates/etc/apache2/sites-available/searx.conf:uwsgi new file mode 100644 index 000000000..4147e8520 --- /dev/null +++ b/utils/templates/etc/apache2/sites-available/searx.conf:uwsgi @@ -0,0 +1,25 @@ +# -*- coding: utf-8; mode: apache -*- + + + + # SetEnvIf Request_URI "${SEARX_APACHE_URL}" dontlog + # CustomLog /dev/null combined env=dontlog + + + + + SecRuleEngine Off + + + Options FollowSymLinks Indexes + SetHandler uwsgi-handler + uWSGISocket ${SEARX_UWSGI_SOCKET} + + Order deny,allow + Deny from all + # Allow from fd00::/8 192.168.0.0/16 fe80::/10 127.0.0.0/8 ::1 + Allow from all + + + + -- cgit v1.2.3 From 971a8264b2e21dd844d2cc2b54686def8ba18c06 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Mon, 27 Jan 2020 19:08:40 +0100 Subject: utils/searx.sh: add apache site searx.conf:uwsgi (WIP) Signed-off-by: Markus Heiser --- utils/templates/etc/apache2/sites-available/searx.conf:uwsgi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'utils/templates/etc/apache2') diff --git a/utils/templates/etc/apache2/sites-available/searx.conf:uwsgi b/utils/templates/etc/apache2/sites-available/searx.conf:uwsgi index 4147e8520..51cbdf41f 100644 --- a/utils/templates/etc/apache2/sites-available/searx.conf:uwsgi +++ b/utils/templates/etc/apache2/sites-available/searx.conf:uwsgi @@ -2,10 +2,10 @@ - # SetEnvIf Request_URI "${SEARX_APACHE_URL}" dontlog + # SetEnvIf Request_URI "${SEARX_URL_PATH}" dontlog # CustomLog /dev/null combined env=dontlog - + SecRuleEngine Off -- cgit v1.2.3 From 924bf6551794e5962688c1e2962dc0c94869e2f1 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Wed, 29 Jan 2020 20:00:50 +0100 Subject: utils/searx.sh & filtron.sh: misc changes from first tests (WIP) Signed-off-by: Markus Heiser --- utils/templates/etc/apache2/sites-available/searx.conf:filtron | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 utils/templates/etc/apache2/sites-available/searx.conf:filtron (limited to 'utils/templates/etc/apache2') diff --git a/utils/templates/etc/apache2/sites-available/searx.conf:filtron b/utils/templates/etc/apache2/sites-available/searx.conf:filtron new file mode 100644 index 000000000..d2f5431a7 --- /dev/null +++ b/utils/templates/etc/apache2/sites-available/searx.conf:filtron @@ -0,0 +1,3 @@ +# -*- coding: utf-8; mode: apache -*- + +ProxyPass "/searx" "http://127.0.0.1:4004/" -- cgit v1.2.3 From 6274a54746b4444f8850aecea0cb0734c6bdc29c Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Thu, 30 Jan 2020 19:55:51 +0100 Subject: utils/searx.sh & filtron.sh: misc changes from first tests (WIP) Signed-off-by: Markus Heiser --- .../etc/apache2/sites-available/searx.conf:filtron | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'utils/templates/etc/apache2') diff --git a/utils/templates/etc/apache2/sites-available/searx.conf:filtron b/utils/templates/etc/apache2/sites-available/searx.conf:filtron index d2f5431a7..f0914e9f9 100644 --- a/utils/templates/etc/apache2/sites-available/searx.conf:filtron +++ b/utils/templates/etc/apache2/sites-available/searx.conf:filtron @@ -1,3 +1,15 @@ # -*- coding: utf-8; mode: apache -*- -ProxyPass "/searx" "http://127.0.0.1:4004/" + + + Require all granted + Allow from all + + Order deny,allow + Deny from all + #Allow from fd00::/8 192.168.0.0/16 fe80::/10 127.0.0.0/8 ::1 + + ProxyPass "http://127.0.0.1:4004" + RequestHeader set "X-Script-Name" "${FILTRON_URL_PATH}" + + -- cgit v1.2.3 From 91a55e159e09450bb25206f42cf0189c2f5476ca Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Fri, 31 Jan 2020 15:54:07 +0100 Subject: 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 --- .../etc/apache2/sites-available/searx.conf:filtron | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'utils/templates/etc/apache2') diff --git a/utils/templates/etc/apache2/sites-available/searx.conf:filtron b/utils/templates/etc/apache2/sites-available/searx.conf:filtron index f0914e9f9..11bd70376 100644 --- a/utils/templates/etc/apache2/sites-available/searx.conf:filtron +++ b/utils/templates/etc/apache2/sites-available/searx.conf:filtron @@ -1,15 +1,23 @@ # -*- coding: utf-8; mode: apache -*- +ProxyPreserveHost On + Require all granted - Allow from all - Order deny,allow Deny from all #Allow from fd00::/8 192.168.0.0/16 fe80::/10 127.0.0.0/8 ::1 + Allow from all + + ProxyPass http://${FILTRON_LISTEN} + RequestHeader set X-Script-Name ${FILTRON_URL_PATH} + + # In Apache it seems, that setting HTTP_HOST header direct here does have no + # effect. I needed to set 'ProxyPreserveHost On' (see above). HTTP_HOST is + # needed by searx to render correct *Search URL* in the *Link* box and + # *saved preference*. - ProxyPass "http://127.0.0.1:4004" - RequestHeader set "X-Script-Name" "${FILTRON_URL_PATH}" + # RequestHeader set Host ${PUBLIC_HOST} -- cgit v1.2.3 From a4437c47ac0bd22cd7f5aaa8e7895cdd8e93a317 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Sun, 2 Feb 2020 18:14:10 +0100 Subject: utils/morty.sh: add script to install morty result proxy Signed-off-by: Markus Heiser --- .../etc/apache2/sites-available/morty.conf | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 utils/templates/etc/apache2/sites-available/morty.conf (limited to 'utils/templates/etc/apache2') diff --git a/utils/templates/etc/apache2/sites-available/morty.conf b/utils/templates/etc/apache2/sites-available/morty.conf new file mode 100644 index 000000000..231b3fb79 --- /dev/null +++ b/utils/templates/etc/apache2/sites-available/morty.conf @@ -0,0 +1,23 @@ +# -*- coding: utf-8; mode: apache -*- + +ProxyPreserveHost On + + + + Require all granted + Order deny,allow + Deny from all + #Allow from fd00::/8 192.168.0.0/16 fe80::/10 127.0.0.0/8 ::1 + Allow from all + + ProxyPass http://${MORTY_LISTEN} + RequestHeader set X-Script-Name ${PUBLIC_URL_PATH_MORTY} + + # In Apache it seems, that setting HTTP_HOST header direct here does have no + # effect. I needed to set 'ProxyPreserveHost On' (see above). HTTP_HOST is + # needed by searx to render correct *Search URL* in the *Link* box and + # *saved preference*. + + # RequestHeader set Host ${PUBLIC_URL_PATH_MORTY} + + -- cgit v1.2.3 From 71d7550dbe750f35f0dd7b5c513bc9e8db9512ee Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Tue, 4 Feb 2020 19:47:33 +0100 Subject: tooling box ./utils/*: minor fix from production test --- utils/templates/etc/apache2/sites-available/morty.conf | 5 +++++ utils/templates/etc/apache2/sites-available/searx.conf:filtron | 9 +++++++++ utils/templates/etc/apache2/sites-available/searx.conf:uwsgi | 2 ++ 3 files changed, 16 insertions(+) (limited to 'utils/templates/etc/apache2') diff --git a/utils/templates/etc/apache2/sites-available/morty.conf b/utils/templates/etc/apache2/sites-available/morty.conf index 231b3fb79..6bcc77b78 100644 --- a/utils/templates/etc/apache2/sites-available/morty.conf +++ b/utils/templates/etc/apache2/sites-available/morty.conf @@ -4,7 +4,12 @@ ProxyPreserveHost On + + SecRuleEngine Off + + Require all granted + Order deny,allow Deny from all #Allow from fd00::/8 192.168.0.0/16 fe80::/10 127.0.0.0/8 ::1 diff --git a/utils/templates/etc/apache2/sites-available/searx.conf:filtron b/utils/templates/etc/apache2/sites-available/searx.conf:filtron index 11bd70376..3f03dfadd 100644 --- a/utils/templates/etc/apache2/sites-available/searx.conf:filtron +++ b/utils/templates/etc/apache2/sites-available/searx.conf:filtron @@ -2,9 +2,18 @@ ProxyPreserveHost On +# SecRuleRemoveById 981054 +# SecRuleRemoveById 981059 +# SecRuleRemoveById 981060 + + + SecRuleEngine Off + + Require all granted + Order deny,allow Deny from all #Allow from fd00::/8 192.168.0.0/16 fe80::/10 127.0.0.0/8 ::1 diff --git a/utils/templates/etc/apache2/sites-available/searx.conf:uwsgi b/utils/templates/etc/apache2/sites-available/searx.conf:uwsgi index 51cbdf41f..21e01ac4e 100644 --- a/utils/templates/etc/apache2/sites-available/searx.conf:uwsgi +++ b/utils/templates/etc/apache2/sites-available/searx.conf:uwsgi @@ -11,6 +11,8 @@ SecRuleEngine Off + Require all granted + Options FollowSymLinks Indexes SetHandler uwsgi-handler uWSGISocket ${SEARX_UWSGI_SOCKET} -- cgit v1.2.3 From ed4cb4f1603dc519aa42cc626874f23d2e9db84e Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Sat, 8 Feb 2020 13:24:08 +0100 Subject: tooling box: varius fix from tests --- utils/templates/etc/apache2/sites-available/searx.conf:filtron | 1 + 1 file changed, 1 insertion(+) (limited to 'utils/templates/etc/apache2') diff --git a/utils/templates/etc/apache2/sites-available/searx.conf:filtron b/utils/templates/etc/apache2/sites-available/searx.conf:filtron index 3f03dfadd..5ede66301 100644 --- a/utils/templates/etc/apache2/sites-available/searx.conf:filtron +++ b/utils/templates/etc/apache2/sites-available/searx.conf:filtron @@ -5,6 +5,7 @@ ProxyPreserveHost On # SecRuleRemoveById 981054 # SecRuleRemoveById 981059 # SecRuleRemoveById 981060 +# SecRuleRemoveById 950907 -- cgit v1.2.3 From 7b4cf2eb489d8f6c95ccac5af180254b78e7c460 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Sun, 29 Mar 2020 15:09:34 +0200 Subject: tooling box: simplify build enviroments - no more need for a .config.mk - docs: use searx.brands environment - searx.sh, filtron.sh & morty.sh are sourcing utils/brand.env Signed-off-by: Markus Heiser --- utils/templates/etc/apache2/sites-available/morty.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'utils/templates/etc/apache2') diff --git a/utils/templates/etc/apache2/sites-available/morty.conf b/utils/templates/etc/apache2/sites-available/morty.conf index 6bcc77b78..2c5727b19 100644 --- a/utils/templates/etc/apache2/sites-available/morty.conf +++ b/utils/templates/etc/apache2/sites-available/morty.conf @@ -23,6 +23,6 @@ ProxyPreserveHost On # needed by searx to render correct *Search URL* in the *Link* box and # *saved preference*. - # RequestHeader set Host ${PUBLIC_URL_PATH_MORTY} + # RequestHeader set Host ${PUBLIC_HOST} -- cgit v1.2.3 From e530e20ae6a4d1f8621f535523cd2af76f715b0b Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Sat, 4 Apr 2020 17:53:16 +0200 Subject: misc: fix variuous marginals Signed-off-by: Markus Heiser --- utils/templates/etc/apache2/sites-available/morty.conf | 4 +--- utils/templates/etc/apache2/sites-available/searx.conf:filtron | 6 +++--- 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'utils/templates/etc/apache2') diff --git a/utils/templates/etc/apache2/sites-available/morty.conf b/utils/templates/etc/apache2/sites-available/morty.conf index 2c5727b19..48b4dd766 100644 --- a/utils/templates/etc/apache2/sites-available/morty.conf +++ b/utils/templates/etc/apache2/sites-available/morty.conf @@ -19,9 +19,7 @@ ProxyPreserveHost On RequestHeader set X-Script-Name ${PUBLIC_URL_PATH_MORTY} # In Apache it seems, that setting HTTP_HOST header direct here does have no - # effect. I needed to set 'ProxyPreserveHost On' (see above). HTTP_HOST is - # needed by searx to render correct *Search URL* in the *Link* box and - # *saved preference*. + # effect. I needed to set 'ProxyPreserveHost On' (see above). # RequestHeader set Host ${PUBLIC_HOST} diff --git a/utils/templates/etc/apache2/sites-available/searx.conf:filtron b/utils/templates/etc/apache2/sites-available/searx.conf:filtron index 5ede66301..e34049063 100644 --- a/utils/templates/etc/apache2/sites-available/searx.conf:filtron +++ b/utils/templates/etc/apache2/sites-available/searx.conf:filtron @@ -24,9 +24,9 @@ ProxyPreserveHost On RequestHeader set X-Script-Name ${FILTRON_URL_PATH} # In Apache it seems, that setting HTTP_HOST header direct here does have no - # effect. I needed to set 'ProxyPreserveHost On' (see above). HTTP_HOST is - # needed by searx to render correct *Search URL* in the *Link* box and - # *saved preference*. + # effect. I needed to set 'ProxyPreserveHost On' (see above). HTTP_HOST + # (ProxyPreserveHost On) is needed by searx to render correct *Search URL* + # in the *Link* box and *saved preference*. # RequestHeader set Host ${PUBLIC_HOST} -- cgit v1.2.3 From eb0d4646d818fe12032379aae2fcd8b5bdb6467e Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Mon, 6 Apr 2020 17:59:06 +0200 Subject: docs: rework of chapter "Install with apache" BTW: normalize installation-nginx.rst --- utils/templates/etc/apache2/sites-available/morty.conf | 4 ++-- utils/templates/etc/apache2/sites-available/searx.conf:filtron | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'utils/templates/etc/apache2') diff --git a/utils/templates/etc/apache2/sites-available/morty.conf b/utils/templates/etc/apache2/sites-available/morty.conf index 48b4dd766..4421cdd51 100644 --- a/utils/templates/etc/apache2/sites-available/morty.conf +++ b/utils/templates/etc/apache2/sites-available/morty.conf @@ -18,8 +18,8 @@ ProxyPreserveHost On ProxyPass http://${MORTY_LISTEN} RequestHeader set X-Script-Name ${PUBLIC_URL_PATH_MORTY} - # In Apache it seems, that setting HTTP_HOST header direct here does have no - # effect. I needed to set 'ProxyPreserveHost On' (see above). + # In Apache it seems, that setting HTTP_HOST header directive here does have + # no effect. I needed to set 'ProxyPreserveHost On' (see above). # RequestHeader set Host ${PUBLIC_HOST} diff --git a/utils/templates/etc/apache2/sites-available/searx.conf:filtron b/utils/templates/etc/apache2/sites-available/searx.conf:filtron index e34049063..2d6af7889 100644 --- a/utils/templates/etc/apache2/sites-available/searx.conf:filtron +++ b/utils/templates/etc/apache2/sites-available/searx.conf:filtron @@ -23,8 +23,8 @@ ProxyPreserveHost On ProxyPass http://${FILTRON_LISTEN} RequestHeader set X-Script-Name ${FILTRON_URL_PATH} - # In Apache it seems, that setting HTTP_HOST header direct here does have no - # effect. I needed to set 'ProxyPreserveHost On' (see above). HTTP_HOST + # In Apache it seems, that setting HTTP_HOST header directive here does have + # no effect. I needed to set 'ProxyPreserveHost On' (see above). HTTP_HOST # (ProxyPreserveHost On) is needed by searx to render correct *Search URL* # in the *Link* box and *saved preference*. -- cgit v1.2.3 From ee39a098acb2386abd5382de5c9476cc4ffe2e03 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Tue, 7 Apr 2020 18:31:51 +0200 Subject: apache: normalize installation (docs and script)s over all distros Signed-off-by: Markus Heiser --- utils/templates/etc/apache2 | 1 + .../etc/apache2/sites-available/morty.conf | 26 ----------------- .../etc/apache2/sites-available/searx.conf:filtron | 33 ---------------------- .../etc/apache2/sites-available/searx.conf:uwsgi | 27 ------------------ 4 files changed, 1 insertion(+), 86 deletions(-) create mode 120000 utils/templates/etc/apache2 delete mode 100644 utils/templates/etc/apache2/sites-available/morty.conf delete mode 100644 utils/templates/etc/apache2/sites-available/searx.conf:filtron delete mode 100644 utils/templates/etc/apache2/sites-available/searx.conf:uwsgi (limited to 'utils/templates/etc/apache2') diff --git a/utils/templates/etc/apache2 b/utils/templates/etc/apache2 new file mode 120000 index 000000000..558a90717 --- /dev/null +++ b/utils/templates/etc/apache2 @@ -0,0 +1 @@ +httpd \ No newline at end of file diff --git a/utils/templates/etc/apache2/sites-available/morty.conf b/utils/templates/etc/apache2/sites-available/morty.conf deleted file mode 100644 index 4421cdd51..000000000 --- a/utils/templates/etc/apache2/sites-available/morty.conf +++ /dev/null @@ -1,26 +0,0 @@ -# -*- coding: utf-8; mode: apache -*- - -ProxyPreserveHost On - - - - - SecRuleEngine Off - - - Require all granted - - Order deny,allow - Deny from all - #Allow from fd00::/8 192.168.0.0/16 fe80::/10 127.0.0.0/8 ::1 - Allow from all - - ProxyPass http://${MORTY_LISTEN} - RequestHeader set X-Script-Name ${PUBLIC_URL_PATH_MORTY} - - # In Apache it seems, that setting HTTP_HOST header directive here does have - # no effect. I needed to set 'ProxyPreserveHost On' (see above). - - # RequestHeader set Host ${PUBLIC_HOST} - - diff --git a/utils/templates/etc/apache2/sites-available/searx.conf:filtron b/utils/templates/etc/apache2/sites-available/searx.conf:filtron deleted file mode 100644 index 2d6af7889..000000000 --- a/utils/templates/etc/apache2/sites-available/searx.conf:filtron +++ /dev/null @@ -1,33 +0,0 @@ -# -*- coding: utf-8; mode: apache -*- - -ProxyPreserveHost On - -# SecRuleRemoveById 981054 -# SecRuleRemoveById 981059 -# SecRuleRemoveById 981060 -# SecRuleRemoveById 950907 - - - - - SecRuleEngine Off - - - Require all granted - - Order deny,allow - Deny from all - #Allow from fd00::/8 192.168.0.0/16 fe80::/10 127.0.0.0/8 ::1 - Allow from all - - ProxyPass http://${FILTRON_LISTEN} - RequestHeader set X-Script-Name ${FILTRON_URL_PATH} - - # In Apache it seems, that setting HTTP_HOST header directive here does have - # no effect. I needed to set 'ProxyPreserveHost On' (see above). HTTP_HOST - # (ProxyPreserveHost On) is needed by searx to render correct *Search URL* - # in the *Link* box and *saved preference*. - - # RequestHeader set Host ${PUBLIC_HOST} - - diff --git a/utils/templates/etc/apache2/sites-available/searx.conf:uwsgi b/utils/templates/etc/apache2/sites-available/searx.conf:uwsgi deleted file mode 100644 index 21e01ac4e..000000000 --- a/utils/templates/etc/apache2/sites-available/searx.conf:uwsgi +++ /dev/null @@ -1,27 +0,0 @@ -# -*- coding: utf-8; mode: apache -*- - - - - # SetEnvIf Request_URI "${SEARX_URL_PATH}" dontlog - # CustomLog /dev/null combined env=dontlog - - - - - SecRuleEngine Off - - - Require all granted - - Options FollowSymLinks Indexes - SetHandler uwsgi-handler - uWSGISocket ${SEARX_UWSGI_SOCKET} - - Order deny,allow - Deny from all - # Allow from fd00::/8 192.168.0.0/16 fe80::/10 127.0.0.0/8 ::1 - Allow from all - - - - -- cgit v1.2.3