summaryrefslogtreecommitdiff
path: root/utils/templates
AgeCommit message (Collapse)Author
2022-03-08[mod] Serving static files with uWSGI (searxng.ini)Markus Heiser
1. Serving static files with uWSGI by using static file mount points [1]. 2. Expires set to one year since there are hashes [2] [1] https://uwsgi-docs.readthedocs.io/en/latest/StaticFiles.html#mode-3-using-static-file-mount-points [2] https://github.com/searxng/searxng/pull/932 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-03-08[fix] socket in SearXNG's uWSGI app (searxng.ini)Markus Heiser
Use SEARX_UWSGI_SOCKET in uWSGI systemd service Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-11Merge pull request #686 from return42/lib_redisMarkus Heiser
Add redis DB and connector
2022-01-03[mod] script to build & install a redis instanceMarkus Heiser
A script to build & install a simple & isolated redis service, dedicated to SearXNG and connected via Unix socket. $ ./manage redis.help redis.: devpkg : install essential packages to compile redis build : build redis binaries at /800GBPCIex4/share/SearXNG/dist/redis/6.2.6/amd64 install : create user (searxng-redis) and install systemd service (searxng-redis) remove : delete user (searxng-redis) and remove service (searxng-redis) shell : start bash interpreter from user searxng-redis src : clone redis source code to <path> and checkput 6.2.6 useradd : create user (searxng-redis) at /usr/local/searxng-redis userdel : delete user (searxng-redis) addgrp : add <user> to group (searxng-redis) rmgrp : remove <user> from group (searxng-redis) Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-02reference docs.searxng.orgAlexandre Flament
2021-11-18[brand] SearXNG - docs rename links and fix documentationMarkus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-10-30[brand] SearXNG - nginx & apache searxng.conf, uwsgi searxng.confMarkus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-10-30[brand] SearXNG - bash env SEARXNG_URLMarkus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-10-11[brand] SearXNG - reference /etc/searxng/settings.ymlMarkus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-10-02SearXNG: SEARXNG_SETTINGS_PATHAlexandre Flament
2021-07-24[mod] reduce enviroment variables in shell scripts to what is neededMarkus Heiser
Not all settings from the 'brand:' section of the YAML files are needed in the shell scripts. This patch reduce the variables in ./utils/brand.env to what is needed. The following ('brand:' settings) can be removed from this file: - ISSUE_URL - DOCS_URL - PUBLIC_INSTANCES - WIKI_URL Tasks running outside of an *installed instance*, need the following settings from the YAML configuration: - GIT_URL <--> brand.git_url - GIT_BRANCH <--> brand.git_branch - SEARX_URL <--> server.base_url (aka PUBLIC_URL) - SEARX_PORT <--> server.port - SEARX_BIND_ADDRESS <--> server.bind_address Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-07-21[mod] normalize .config.sh with settings.ymlMarkus Heiser
In commit 94851790 we have centralized all SearXNG setups in the settings.yml file: 94851790 [mod] move brand options from Makefile to settings.yml This step has not yet been completed for the installation procedures! Since all SearXNG setups are done in the settings.yml these environment variables needs to be removed from the ./conf.sh file. Scripts and other tasks running outside of an instance got the needed values from the ./utils/brand.env file. By example: ATM the environment variables of the ./config.sh file are in conflict with them from settings.yml: - PUBLIC_URL --> {server:base_url} - SEARX_INTERNAL_HTTP --> {server:bind_address}.{server:port} - GIT_BRANCH --> {brand:GIT_URL} These environment variable of a SearXNG instance and additional - SEARX_SETTINGS_TEMPLATE has been remove from the '.config.sh' file. With this patch, the main focus of ./conf.sh resists on environment variables needed for the installation of morty, filtron software. modified .config.sh: - removed no longer supported variables (see above) - add comment about: SearXNG setup in settings.yml modified utils/searx.sh: - SEARX_INTERNAL_HTTP no longer take from .config.sh - SEARX_SETTINGS_PATH /etc/searx/settings.yml - SEARX_SETTINGS_TEMPLATE obsolete modified utils/lib_install.sh: Initialize environment variables SEARX_PYENV, SEARX_SETTINGS_PATH and PUBLIC_URL. modified: utils/morty.sh Add missing hint about SEARX_SETTINGS_PATH and move PUBLIC_URL to utils/lib_install.sh modified: utils/morty.sh Move PUBLIC_URL to utils/lib_install.sh Renamed utils/templates/etc/searx/use_default_settings.yml -> settings.yml - removed option which can't be modified after installation - add some comments with examples Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-07-18[mod] drop usage of the searx.brand namespace (python procs)Markus Heiser
Added function searx.get_setting(name, default=_unset): Returns the value to which ``name`` point. If there is no such name in the settings and the ``default`` is unset, a KeyError exception is raised. In all the python processes .. - make docs - make buildenv - make install (setup.py) the usage of the 'brand.*' name space is replaced by 'searx.get_setting' function. - brand.SEARX_URL --> get_setting('server.base_url') - brand.GIT_URL --> get_setting('brand.git_url') - brand.GIT_BRANCH' --> get_setting('server.base_url') - brand.ISSUE_URL --> get_setting('brand.issue_url') - brand.DOCS_URL --> get_setting('brand.docs_url') - brand.PUBLIC_INSTANCES --> get_setting('brand.public_instances') - brand.CONTACT_URL --> get_setting('general.contact_url', '') - brand.WIKI_URL --> get_setting('brand.wiki_url') - brand.TWITTER_URL --> get_setting('brand.twitter_url', '') Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-06-12[yamllint] ./utils/templates/etc/searx/*.ymlMarkus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-05-28[enh] add settings option to enable/disable search formatsMarkus Heiser
Access to formats can be denied by settings configuration:: search: formats: [html, csv, json, rss] Closes: https://github.com/searxng/searxng/issues/95 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-03-04Use $host in nginx morty.conf templateAlex Balgavy
2021-03-03Fix security vulnerabilities in suggested nginx configurationAlex Balgavy
The suggested configurations for nginx found in the documentation and templates lead to vulnerabilities allowing host spoofing [1] and path traversal [2], as reported by Gixy [3]. This commit fixes those issues. [1] https://github.com/yandex/gixy/blob/master/docs/en/plugins/hostspoofing.md [2] https://github.com/yandex/gixy/blob/master/docs/en/plugins/aliastraversal.md [3] https://github.com/yandex/gixy
2021-01-12[enh] add searx.sharedAlexandre Flament
shared dictionary between the workers (UWSGI or werkzeug) scheduler: run a task once every x seconds (UWSGI or werkzeug)
2020-12-08[doc] recommend to use 'use_default_settings=True'Markus Heiser
Since #2291 is merged, it is recommend to use:: use_default_settings=True 1. Add a template file use_default_settings.yml:: SEARX_SETTINGS_TEMPLATE="${REPO_ROOT}/utils/templates/etc/searx/use_default_settings.yml" 2. In Chapter "Configuration" recommend to make use of 'use_default_settings=True' and describe it 3. Rewrite of docs/admin/settings.rst - move chapter 'settings.yml location' to the top - update and split chapter 'Global Settings' 4. Add environment SEARX_SETTINGS_TEMPLATE to .config.sh 5. Use environment $SEARX_SETTINGS_TEMPLATE in the utils/searx.sh script Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-10-19Fix typo chmod searx:searx > chown searx:searxrenyhp
2020-07-11[fix] external_bang - UnicodeDecodeError: 'ascii' codec can't decode (#2043)Markus Heiser
Python's default encoding depends on the platform, set (python) default encoding UTF-8 in uwsgi ini files: LANG=C.UTF-8 LANGUAGE=C.UTF-8 LC_ALL=C.UTF-8 Error pattern: Traceback (most recent call last): File "/usr/local/searx/searx-src/searx/webapp.py", line 74, in <module> from searx.search import SearchWithPlugins, get_search_query_from_webapp File "/usr/local/searx/searx-src/searx/search.py", line 32, in <module> from searx.external_bang import get_bang_url File "/usr/local/searx/searx-src/searx/external_bang.py", line 13, in <module> for bang in json.load(json_file)['bang']: File "/usr/lib/python3.8/json/__init__.py", line 293, in load return loads(fp.read(), File "/usr/lib/python3.8/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 31341: ordinal not in range(128) close: https://github.com/asciimoo/searx/issues/2041 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-06-18[fix] indentation of filtron's rules (json)Markus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-04-28utils/morty.sh: set morty key to avoid service abuseMarkus Heiser
- https://github.com/asciimoo/searx/issues/1871#issuecomment-592459798 make install all generates random MORTY_KEY, install service with that key and sets option in the searx settingy.yml file. Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-04-11nginx: normalize installation (docs and script)s over all distrosMarkus Heiser
This is the revision of the documentation about the varous nginx installation variants. It also implements the nginx installation scripts for morty and filtron. Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-04-08Changes from the installation tests on (all) LXC containers.Markus Heiser
Tested and fixed HTTP & uWSGI installation on: ubu1604 ubu1804 ubu1910 ubu2004 fedora31 archlinux Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-04-07apache: normalize installation (docs and script)s over all distrosMarkus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-04-06docs: rework of chapter "Install with apache"Markus Heiser
BTW: normalize installation-nginx.rst
2020-04-05filtron.sh & morty.sh: improve usage message (if used in containers)Markus Heiser
BTW: normalize soma variable names Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-04-04misc: fix variuous marginalsMarkus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-03-29tooling box: simplify build enviromentsMarkus Heiser
- 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 <markus.heiser@darmarit.de>
2020-03-06fix: minor typosMarkus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-03-06docs: improve description of uwsgi & ngingx setupMarkus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-02-26LXC: install searx-suite installs searx, filtron & morty on all containersMarkus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-02-25utils/lib.sh: make uWSGI installation available for all distrosMarkus Heiser
support: ubuntu, debin, fedora, archlinux Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-02-17searx.sh: install settings at /etc/searx/settings.ymlMarkus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-02-17filtron: add missing log action to the filtron rulesMarkus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-02-11filtron.sh: updated rules from productionMarkus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-02-08tooling box: varius fix from testsMarkus Heiser
2020-02-04tooling box ./utils/*: minor fix from production testMarkus Heiser
2020-02-04/etc/filtron/rules.json: normalize rules from docs & tooling boxMarkus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-02-02utils/morty.sh: add script to install morty result proxyMarkus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-01-31utils/filtron.sh: add option to debug filtron requestsMarkus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-01-31apache: reverse proxy, set `ProxyPreserveHost On`Markus Heiser
related discussions: - https://github.com/asciimoo/searx/issues/1822 - https://github.com/asciimoo/searx/issues/1819#issuecomment-580400259 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-01-30utils/searx.sh & filtron.sh: misc changes from first tests (WIP)Markus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-01-29utils/searx.sh & filtron.sh: misc changes from first tests (WIP)Markus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-01-27utils/searx.sh: add apache site searx.conf:uwsgi (WIP)Markus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-01-21utils/searx.sh: add apache site searx.conf:uwsgiMarkus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-01-20utils/searx.sh: add script to install isolated searx serviceMarkus Heiser
First version which serves searx over uwsgi at http://127.0.0.1:8888 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-01-16utils/searx.sh: add script to install isolated searx service (WIP)Markus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-01-13filtron: log suspiciously frequent queries (WIP)Markus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>