From 387c6a77691fec514704bdf178b9ab94ad4abb40 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Fri, 6 Mar 2020 14:47:00 +0100 Subject: docs: improve description of uwsgi & ngingx setup Signed-off-by: Markus Heiser --- utils/lib.sh | 1 + utils/searx.sh | 4 +++- utils/templates/etc/uwsgi/apps-archlinux/searx.ini | 20 +++++++++++++++++--- utils/templates/etc/uwsgi/apps-available/searx.ini | 20 +++++++++++++++++--- 4 files changed, 38 insertions(+), 7 deletions(-) (limited to 'utils') diff --git a/utils/lib.sh b/utils/lib.sh index f0c710311..09883df3b 100755 --- a/utils/lib.sh +++ b/utils/lib.sh @@ -881,6 +881,7 @@ uWSGI_enable_app() { mkdir -p "${uWSGI_APPS_ENABLED}" rm -f "${uWSGI_APPS_ENABLED}/${CONF}" ln -s "${uWSGI_APPS_AVAILABLE}/${CONF}" "${uWSGI_APPS_ENABLED}/${CONF}" + systemctl enable "uwsgi@${CONF%.*}" info_msg "enabled uWSGI app: ${CONF} (restart required)" ;; fedora-*) diff --git a/utils/searx.sh b/utils/searx.sh index a93e36c95..9d73f46e2 100755 --- a/utils/searx.sh +++ b/utils/searx.sh @@ -88,7 +88,7 @@ usage() { usage:: $(basename "$0") shell - $(basename "$0") install [all|user|searx-src|pyenv|apache] + $(basename "$0") install [all|user|searx-src|pyenv|uwsgi|apache] $(basename "$0") update [searx] $(basename "$0") remove [all|user|pyenv|searx-src] $(basename "$0") activate [service] @@ -104,6 +104,7 @@ install / remove :user: add/remove service user '$SERVICE_USER' ($SERVICE_HOME) :searx-src: clone $SEARX_GIT_URL :pyenv: create/remove virtualenv (python) in $SEARX_PYENV + :uwsgi: install searx uWSGI application :settings: reinstall settings from ${REPO_ROOT}/searx/settings.yml update searx Update searx installation ($SERVICE_HOME) @@ -165,6 +166,7 @@ main() { pyenv) create_pyenv ;; searx-src) clone_searx ;; settings) install_settings ;; + uwsgi) install_searx_uwsgi;; *) usage "$_usage"; exit 42;; esac ;; update) diff --git a/utils/templates/etc/uwsgi/apps-archlinux/searx.ini b/utils/templates/etc/uwsgi/apps-archlinux/searx.ini index 78ad50443..f96554060 100644 --- a/utils/templates/etc/uwsgi/apps-archlinux/searx.ini +++ b/utils/templates/etc/uwsgi/apps-archlinux/searx.ini @@ -57,10 +57,24 @@ virtualenv = ${SEARX_PYENV} pythonpath = ${SEARX_SRC} -# plugin http -# ----------- +# speak to upstream +# ----------------- # -# https://uwsgi-docs.readthedocs.io/en/latest/Options.html#plugin-http +# Activate the 'http' configuration for filtron or activate the 'socket' +# configuration if you setup your HTTP server to use uWSGI protocol via sockets. +# using IP: +# +# https://uwsgi-docs.readthedocs.io/en/latest/Options.html#plugin-http # Native HTTP support: https://uwsgi-docs.readthedocs.io/en/latest/HTTP.html + http = ${SEARX_INTERNAL_URL} + +# using unix-sockets: +# +# On some distributions you need to create the app folder for the sockets:: +# +# mkdir -p /run/uwsgi/app/searx/socket +# chmod -R ${SERVICE_USER}:${SERVICE_GROUP} /run/uwsgi/app/searx/socket +# +# socket = /run/uwsgi/app/searx/socket \ No newline at end of file diff --git a/utils/templates/etc/uwsgi/apps-available/searx.ini b/utils/templates/etc/uwsgi/apps-available/searx.ini index bc62e5864..4f8674012 100644 --- a/utils/templates/etc/uwsgi/apps-available/searx.ini +++ b/utils/templates/etc/uwsgi/apps-available/searx.ini @@ -56,10 +56,24 @@ virtualenv = ${SEARX_PYENV} pythonpath = ${SEARX_SRC} -# plugin http -# ----------- +# speak to upstream +# ----------------- # -# https://uwsgi-docs.readthedocs.io/en/latest/Options.html#plugin-http +# Activate the 'http' configuration for filtron or activate the 'socket' +# configuration if you setup your HTTP server to use uWSGI protocol via sockets. +# using IP: +# +# https://uwsgi-docs.readthedocs.io/en/latest/Options.html#plugin-http # Native HTTP support: https://uwsgi-docs.readthedocs.io/en/latest/HTTP.html + http = ${SEARX_INTERNAL_URL} + +# using unix-sockets: +# +# On some distributions you need to create the app folder for the sockets:: +# +# mkdir -p /run/uwsgi/app/searx/socket +# chmod -R ${SERVICE_USER}:${SERVICE_GROUP} /run/uwsgi/app/searx/socket +# +# socket = /run/uwsgi/app/searx/socket \ No newline at end of file -- cgit v1.2.3