diff options
author | Markus Heiser <markus.heiser@darmarit.de> | 2021-10-11 19:59:34 +0200 |
---|---|---|
committer | Markus Heiser <markus.heiser@darmarit.de> | 2021-10-30 16:11:01 +0200 |
commit | a9fc4885f2d4ab3fba8fd9fbaa0386090250bd11 (patch) | |
tree | b2682542e454729d437a93e463e2bc15bd29ec7e /utils | |
parent | 68effd5eda7a0e47ffddf5ed328d412251b12ebc (diff) | |
download | searxng-a9fc4885f2d4ab3fba8fd9fbaa0386090250bd11.tar.gz searxng-a9fc4885f2d4ab3fba8fd9fbaa0386090250bd11.zip |
[brand] SearXNG - bash env SEARXNG_URL
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'utils')
-rw-r--r-- | utils/brand.env | 2 | ||||
-rw-r--r-- | utils/build_env.py | 2 | ||||
-rwxr-xr-x | utils/filtron.sh | 2 | ||||
-rwxr-xr-x | utils/lib_install.sh | 14 | ||||
-rwxr-xr-x | utils/morty.sh | 2 | ||||
-rwxr-xr-x | utils/searx.sh | 4 | ||||
-rw-r--r-- | utils/templates/etc/httpd/sites-available/searx.conf:uwsgi | 4 | ||||
-rw-r--r-- | utils/templates/etc/nginx/default.apps-available/searx.conf:filtron | 6 |
8 files changed, 18 insertions, 18 deletions
diff --git a/utils/brand.env b/utils/brand.env index 5cc2af35b..31afce53c 100644 --- a/utils/brand.env +++ b/utils/brand.env @@ -1,4 +1,4 @@ -export SEARX_URL='' +export SEARXNG_URL='' export SEARXNG_PORT='8888' export SEARXNG_BIND_ADDRESS='127.0.0.1' export GIT_URL='https://github.com/searxng/searxng' diff --git a/utils/build_env.py b/utils/build_env.py index cd2fc2d04..709da6815 100644 --- a/utils/build_env.py +++ b/utils/build_env.py @@ -28,7 +28,7 @@ def _env(*arg, **kwargs): name_val = [ - ('SEARX_URL' , 'server.base_url'), + ('SEARXNG_URL' , 'server.base_url'), ('SEARXNG_PORT' , 'server.port'), ('SEARXNG_BIND_ADDRESS' , 'server.bind_address'), diff --git a/utils/filtron.sh b/utils/filtron.sh index eb34b2413..e4a4d32e8 100755 --- a/utils/filtron.sh +++ b/utils/filtron.sh @@ -560,7 +560,7 @@ This installs a reverse proxy (ProxyPass) into nginx site (${NGINX_FILTRON_SITE} # shellcheck disable=SC2034 SEARX_SRC=$("${REPO_ROOT}/utils/searx.sh" --getenv SEARX_SRC) # shellcheck disable=SC2034 - SEARX_URL_PATH=$("${REPO_ROOT}/utils/searx.sh" --getenv SEARX_URL_PATH) + SEARXNG_URL_PATH=$("${REPO_ROOT}/utils/searx.sh" --getenv SEARXNG_URL_PATH) nginx_install_app --variant=filtron "${NGINX_FILTRON_SITE}" info_msg "testing public url .." diff --git a/utils/lib_install.sh b/utils/lib_install.sh index 4fd63b830..4a251c096 100755 --- a/utils/lib_install.sh +++ b/utils/lib_install.sh @@ -116,9 +116,9 @@ install_log_searx_instance() { echo -e "---- SearXNG instance setup ${_BBlue}(status: $(install_searx_get_state))${_creset}" echo -e " SEARXNG_SETTINGS_PATH : ${_BBlue}${SEARXNG_SETTINGS_PATH}${_creset}" - echo -e " SSEARX_PYENV : ${_BBlue}${SEARX_PYENV}${_creset}" + echo -e " SEARX_PYENV : ${_BBlue}${SEARX_PYENV}${_creset}" echo -e " SEARX_SRC : ${_BBlue}${SEARX_SRC:-none}${_creset}" - echo -e " SEARX_URL : ${_BBlue}${SEARX_URL:-none}${_creset}" + echo -e " SEARXNG_URL : ${_BBlue}${SEARXNG_URL:-none}${_creset}" if in_container; then # searx is listening on 127.0.0.1 and not available from outside container @@ -184,17 +184,17 @@ install_searx_get_state(){ # shellcheck source=utils/brand.env source "${REPO_ROOT}/utils/brand.env" -# SEARX_URL aka PUBLIC_URL: the public URL of the instance (e.g. -# "https://example.org/searx"). The value is taken from environment $SEARX_URL +# SEARXNG_URL aka PUBLIC_URL: the public URL of the instance (e.g. +# "https://example.org/searx"). The value is taken from environment $SEARXNG_URL # in ./utils/brand.env. This variable is a empty string if server.base_url in # the settings.yml is set to 'false'. -SEARX_URL="${SEARX_URL:-http://$(uname -n)}" +SEARXNG_URL="${SEARXNG_URL:-http://$(uname -n)}" if in_container; then # hint: Linux containers do not have DNS entries, lets use IPs - SEARX_URL="http://$(primary_ip)" + SEARXNG_URL="http://$(primary_ip)" fi -PUBLIC_URL="${SEARX_URL}" +PUBLIC_URL="${SEARXNG_URL}" source_dot_config diff --git a/utils/morty.sh b/utils/morty.sh index 60220df02..fdbe2b54e 100755 --- a/utils/morty.sh +++ b/utils/morty.sh @@ -513,7 +513,7 @@ This installs a reverse proxy (ProxyPass) into nginx site (${NGINX_MORTY_SITE})" # shellcheck disable=SC2034 SEARX_SRC=$("${REPO_ROOT}/utils/searx.sh" --getenv SEARX_SRC) # shellcheck disable=SC2034 - SEARX_URL_PATH=$("${REPO_ROOT}/utils/searx.sh" --getenv SEARX_URL_PATH) + SEARXNG_URL_PATH=$("${REPO_ROOT}/utils/searx.sh" --getenv SEARXNG_URL_PATH) nginx_install_app "${NGINX_MORTY_SITE}" info_msg "testing public url .." diff --git a/utils/searx.sh b/utils/searx.sh index e3393835c..00ee93010 100755 --- a/utils/searx.sh +++ b/utils/searx.sh @@ -14,9 +14,9 @@ source "${REPO_ROOT}/utils/lib_install.sh" SEARX_INTERNAL_HTTP="${SEARXNG_BIND_ADDRESS}:${SEARXNG_PORT}" -SEARX_URL_PATH="${SEARX_URL_PATH:-$(echo "${PUBLIC_URL}" \ +SEARXNG_URL_PATH="${SEARXNG_URL_PATH:-$(echo "${PUBLIC_URL}" \ | sed -e 's,^.*://[^/]*\(/.*\),\1,g')}" -[[ "${SEARX_URL_PATH}" == "${PUBLIC_URL}" ]] && SEARX_URL_PATH=/ +[[ "${SEARXNG_URL_PATH}" == "${PUBLIC_URL}" ]] && SEARXNG_URL_PATH=/ SERVICE_NAME="searx" SERVICE_USER="${SERVICE_USER:-${SERVICE_NAME}}" diff --git a/utils/templates/etc/httpd/sites-available/searx.conf:uwsgi b/utils/templates/etc/httpd/sites-available/searx.conf:uwsgi index ef702de3a..aabc125ae 100644 --- a/utils/templates/etc/httpd/sites-available/searx.conf:uwsgi +++ b/utils/templates/etc/httpd/sites-available/searx.conf:uwsgi @@ -5,10 +5,10 @@ LoadModule proxy_module ${APACHE_MODULES}/mod_proxy.so LoadModule proxy_uwsgi_module ${APACHE_MODULES}/mod_proxy_uwsgi.so # LoadModule setenvif_module ${APACHE_MODULES}/mod_setenvif.so -# SetEnvIf Request_URI "${SEARX_URL_PATH}" dontlog +# SetEnvIf Request_URI "${SEARXNG_URL_PATH}" dontlog # CustomLog /dev/null combined env=dontlog -<Location ${SEARX_URL_PATH}> +<Location ${SEARXNG_URL_PATH}> <IfModule mod_security2.c> SecRuleEngine Off diff --git a/utils/templates/etc/nginx/default.apps-available/searx.conf:filtron b/utils/templates/etc/nginx/default.apps-available/searx.conf:filtron index a89aa38b3..e25461c47 100644 --- a/utils/templates/etc/nginx/default.apps-available/searx.conf:filtron +++ b/utils/templates/etc/nginx/default.apps-available/searx.conf:filtron @@ -1,6 +1,6 @@ # https://example.org/searx -location ${SEARX_URL_PATH} { +location ${SEARXNG_URL_PATH} { proxy_pass http://127.0.0.1:4004/; proxy_set_header Host \$host; @@ -8,9 +8,9 @@ location ${SEARX_URL_PATH} { proxy_set_header X-Real-IP \$remote_addr; proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for; proxy_set_header X-Scheme \$scheme; - proxy_set_header X-Script-Name ${SEARX_URL_PATH}; + proxy_set_header X-Script-Name ${SEARXNG_URL_PATH}; } -location ${SEARX_URL_PATH}/static/ { +location ${SEARXNG_URL_PATH}/static/ { alias ${SEARX_SRC}/searx/static/; } |