diff options
author | Markus Heiser <markus.heiser@darmarit.de> | 2020-04-06 17:59:06 +0200 |
---|---|---|
committer | Markus Heiser <markus.heiser@darmarit.de> | 2020-04-06 17:59:06 +0200 |
commit | eb0d4646d818fe12032379aae2fcd8b5bdb6467e (patch) | |
tree | 385fba8e0c54a4159a28fb6db78d1ee448092a2b /utils | |
parent | c81849cb5a22d937c0f1de1d02d1fb8e3a7849cd (diff) | |
download | searxng-eb0d4646d818fe12032379aae2fcd8b5bdb6467e.tar.gz searxng-eb0d4646d818fe12032379aae2fcd8b5bdb6467e.zip |
docs: rework of chapter "Install with apache"
BTW: normalize installation-nginx.rst
Diffstat (limited to 'utils')
-rwxr-xr-x | utils/lib.sh | 12 | ||||
-rwxr-xr-x | utils/searx.sh | 5 | ||||
-rw-r--r-- | utils/templates/etc/apache2/sites-available/morty.conf | 4 | ||||
-rw-r--r-- | utils/templates/etc/apache2/sites-available/searx.conf:filtron | 4 |
4 files changed, 18 insertions, 7 deletions
diff --git a/utils/lib.sh b/utils/lib.sh index 9d5068646..aaeb5093b 100755 --- a/utils/lib.sh +++ b/utils/lib.sh @@ -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() { diff --git a/utils/searx.sh b/utils/searx.sh index a74aec393..86b651696 100755 --- a/utils/searx.sh +++ b/utils/searx.sh @@ -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 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*. |