docs: rework of chapter "Install with apache"

BTW: normalize installation-nginx.rst
This commit is contained in:
Markus Heiser
2020-04-06 17:59:06 +02:00
parent c81849cb5a
commit eb0d4646d8
7 changed files with 465 additions and 63 deletions

View File

@@ -634,9 +634,15 @@ if [[ -z "${APACHE_SITES_AVAILABE}" ]]; then
fi
apache_is_installed() {
(command -v apachectl \
&& command -v a2ensite \
&& command -v a2dissite ) &>/dev/null
case $DIST_ID-$DIST_VERS in
ubuntu-*|debian-*)
(command -v apachectl \
&& command -v a2ensite \
&& command -v a2dissite ) &>/dev/null
;;
arch) (command -v httpd) ;;
fedora) (command -v httpd) ;;
esac
}
apache_reload() {

View File

@@ -735,6 +735,11 @@ This installs the searx uwsgi app as apache site. If your server is public to
the internet, you should instead use a reverse proxy (filtron) to block
excessively bot queries."
case $DIST_ID-$DIST_VERS in
ubuntu-*|debian-*) : ;;
*) err_msg "sorry distro $DIST_ID $DIST_VERS not yet supported"; exit 42 ;;
esac
! apache_is_installed && err_msg "Apache is not installed."
if ! ask_yn "Do you really want to install apache site for searx-uwsgi?"; then

View File

@@ -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}

View File

@@ -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*.