summaryrefslogtreecommitdiff
path: root/searx
diff options
context:
space:
mode:
authorrafa_99 <raroma09@gmail.com>2022-06-20 00:17:18 +0100
committerrafa_99 <raroma09@gmail.com>2022-06-20 00:17:18 +0100
commit5f72ed29b291a9d61f56a160b9b3ee2f62ecc13d (patch)
tree35b8e914c2792086da0b0acd7a841e5509b24228 /searx
parente31c732a5e8d0e1212624718de9738560396ab49 (diff)
Replaced SearX with SearXNG
Diffstat (limited to 'searx')
-rw-r--r--searx/README.md8
-rwxr-xr-xsearx/deploy47
-rw-r--r--searx/nginx/pages/searx.conf6
-rw-r--r--searx/nginx/sites-available/server12
-rw-r--r--searx/searx/settings.yml35
-rw-r--r--searx/uwsgi/apps-available/searx.ini87
6 files changed, 0 insertions, 195 deletions
diff --git a/searx/README.md b/searx/README.md
deleted file mode 100644
index 6062098..0000000
--- a/searx/README.md
+++ /dev/null
@@ -1,8 +0,0 @@
-# SearX
-Self hosted SearX instance with default configurations.
-To install just run the script using:
-
-`bash deploy`
-
-## About
-All the configurations are implemented on local area network, to host searx just as localhost, remove your ip from `nginx/sites-available/searx`, under the server\_name section.
diff --git a/searx/deploy b/searx/deploy
deleted file mode 100755
index 998b393..0000000
--- a/searx/deploy
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/bin/bash
-
-# Installing dependencies
-sudo apt install -y python3-dev python3-babel python3-venv uwsgi uwsgi-plugin-python3 git build-essential libxslt-dev zlib1g-dev libffi-dev libssl-dev shellcheck nginx
-
-# SearX
-## Creating and setting up user
-sudo -H useradd --shell /bin/bash --system \
- --home-dir "/usr/local/searx" \
- --comment 'Privacy-respecting metasearch engine' searx
-
-sudo -H mkdir "/usr/local/searx"
-sudo -H chown -R "searx:searx" "/usr/local/searx"
-
-## Installing searx
-sudo -H -u searx git clone "https://github.com/searx/searx.git" "/usr/local/searx/searx-src"
-sudo -H -u searx python3 -m venv "/usr/local/searx/searx-pyenv"
-echo "export SEARX_SETTINGS_PATH=\"/etc/searx/settings.yml\"" | sudo -H -u searx tee -a "/usr/local/searx/.profile" > /dev/null
-echo ". /usr/local/searx/searx-pyenv/bin/activate" | sudo -H -u searx tee -a "/usr/local/searx/.profile" > /dev/null
-sudo -H -u searx /usr/local/searx/searx-pyenv/bin/pip install -U pip setuptools wheel pyyaml
-sudo -H -u searx /usr/local/searx/searx-pyenv/bin/pip install -e "/usr/local/searx/searx-src"
-
-## Configuring SearX
-sudo -H cp -rf "searx/" "/etc/"
-sudo -H sed -i s:YOURHOSTNAME:"$(hostname)":g /etc/searx/settings.yml
-
-# uwsgi
-sudo -H cp -rf uwsgi/ /etc/
-sudo -H ln -s /etc/uwsgi/apps-available/searx.ini /etc/uwsgi/apps-enabled/
-sudo -H mkdir -p /run/uwsgi/app/searx/
-sudo -H chown -R searx:searx /run/uwsgi/app/searx/
-
-# Nginx
-sudo -H mkdir -p /etc/nginx/certs
-sudo -H cp -rf nginx/ /etc/
-sudo -H ln -s /etc/nginx/sites-available/server /etc/nginx/sites-enabled/server
-sudo -H sed -i s:"$(grep access_log /etc/nginx/nginx.conf | awk '{print $2}' )":\/dev\/null\;:g /etc/nginx/nginx.conf
-sudo -H sed -i s:"$(grep error_log /etc/nginx/nginx.conf | awk '{print $2}' )":\/dev\/null\;:g /etc/nginx/nginx.conf
-
-# SSL
-openssl req -x509 -out localhost.crt -keyout localhost.key -newkey rsa:2048 -nodes -sha256 -subj '/CN=localhost' -extensions EXT -config <( printf "[dn]\nCN=localhost\n[req]\ndistinguished_name = dn\n[EXT]\nsubjectAltName=DNS:localhost\nkeyUsage=digitalSignature\nextendedKeyUsage=serverAuth")
-sudo mv localhost.* /etc/nginx/certs
-
-# Restarting services
-sudo -H systemctl restart nginx
-sudo -H systemctl enable nginx
-sudo -H service uwsgi restart searx
diff --git a/searx/nginx/pages/searx.conf b/searx/nginx/pages/searx.conf
deleted file mode 100644
index 1c58d41..0000000
--- a/searx/nginx/pages/searx.conf
+++ /dev/null
@@ -1,6 +0,0 @@
-location /searx
-{
- include uwsgi_params;
- uwsgi_param SCRIPT_NAME /searx;
- uwsgi_pass unix:/run/uwsgi/app/searx/socket;
-}
diff --git a/searx/nginx/sites-available/server b/searx/nginx/sites-available/server
deleted file mode 100644
index ba75367..0000000
--- a/searx/nginx/sites-available/server
+++ /dev/null
@@ -1,12 +0,0 @@
-server
-{
- server_name hostname.local;
-
- listen 443 ssl;
- listen [::]:443 ssl;
-
- ssl_certificate /etc/nginx/certs/localhost.crt;
- ssl_certificate_key /etc/nginx/certs/localhost.key;
-
- include pages/*.conf;
-}
diff --git a/searx/searx/settings.yml b/searx/searx/settings.yml
deleted file mode 100644
index 351ed45..0000000
--- a/searx/searx/settings.yml
+++ /dev/null
@@ -1,35 +0,0 @@
-use_default_settings: True
-
-general:
- debug : False # Debug mode, only for development
- instance_name : "Sneed Searx" # displayed name
-
-search:
- safe_search : 0 # Filter results. 0: None, 1: Moderate, 2: Strict
- autocomplete : "duckduckgo" # Existing autocomplete backends: "dbpedia", "duckduckgo", "google", "startpage", "swisscows", "qwant", "wikipedia" - leave blank to turn it off by default
- default_lang : "" # Default search language - leave blank to detect from browser information or use codes from 'languages.py'
-
-server:
- port : 8888
- bind_address : "127.0.0.1" # address to listen on
- secret_key : "" # change this!
- base_url : "https://YOURHOSTNAME/searx" # Set custom base_url. Possible values: False or "https://your.custom.host/location/"
- image_proxy : False # Proxying image results through searx
-
-ui:
- static_path : "" # Custom static path - leave it blank if you didn't change
- templates_path : "" # Custom templates path - leave it blank if you didn't change
- default_theme : oscar # ui theme
- default_locale : "" # Default interface locale - leave blank to detect from browser information or use codes from the 'locales' config section
- theme_args :
- oscar_style : logicodev-dark # default style of oscar
- categories_order :
- - general
- - files
- - images
- - videos
- - science
- - it
- - map
- - music
- - news
diff --git a/searx/uwsgi/apps-available/searx.ini b/searx/uwsgi/apps-available/searx.ini
deleted file mode 100644
index 430a455..0000000
--- a/searx/uwsgi/apps-available/searx.ini
+++ /dev/null
@@ -1,87 +0,0 @@
-[uwsgi]
-
-# uWSGI core
-# ----------
-#
-# https://uwsgi-docs.readthedocs.io/en/latest/Options.html#uwsgi-core
-
-# Who will run the code
-uid = searx
-gid = searx
-
-# set (python) default encoding UTF-8
-env = LANG=C.UTF-8
-env = LANGUAGE=C.UTF-8
-env = LC_ALL=C.UTF-8
-
-# chdir to specified directory before apps loading
-chdir = /usr/local/searx/searx-src/searx
-
-# searx configuration (settings.yml)
-env = SEARX_SETTINGS_PATH=/etc/searx/settings.yml
-
-# disable logging for privacy
-disable-logging = true
-
-# The right granted on the created socket
-chmod-socket = 666
-
-# Plugin to use and interpretor config
-single-interpreter = true
-
-# enable master process
-master = true
-
-# load apps in each worker instead of the master
-lazy-apps = true
-
-# load uWSGI plugins
-plugin = python3,http
-
-# By default the Python plugin does not initialize the GIL. This means your
-# app-generated threads will not run. If you need threads, remember to enable
-# them with enable-threads. Running uWSGI in multithreading mode (with the
-# threads options) will automatically enable threading support. This *strange*
-# default behaviour is for performance reasons.
-enable-threads = true
-
-
-# plugin: python
-# --------------
-#
-# https://uwsgi-docs.readthedocs.io/en/latest/Options.html#plugin-python
-
-# load a WSGI module
-module = searx.webapp
-
-# set PYTHONHOME/virtualenv
-virtualenv = /usr/local/searx/searx-pyenv
-
-# add directory (or glob) to pythonpath
-pythonpath = /usr/local/searx/searx-src
-
-
-# speak to upstream
-# -----------------
-#
-# 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 = 127.0.0.1:8888
-
-# using unix-sockets:
-#
-# On some distributions you need to create the app folder for the sockets::
-#
-# mkdir -p /run/uwsgi/app/searx
-# chown -R searx:searx /run/uwsgi/app/searx
-#
-socket = /run/uwsgi/app/searx/socket
-
-# Cache
-cache2 = name=searxcache,items=2000,blocks=2000,blocksize=4096,bitmap=1