From 95b73daa36b23565a8566f71f9b202d3459b685f Mon Sep 17 00:00:00 2001 From: Sam Chudnick Date: Sun, 25 Jun 2023 09:52:36 -0400 Subject: Initial Commit --- data/searxng/searxng.conf | 48 ++++++++++++++++++++++++++++++ data/searxng/settings.yml | 74 +++++++++++++++++++++++++++++++++++++++++++++++ data/searxng/uwsgi.ini | 50 ++++++++++++++++++++++++++++++++ 3 files changed, 172 insertions(+) create mode 100644 data/searxng/searxng.conf create mode 100644 data/searxng/settings.yml create mode 100644 data/searxng/uwsgi.ini (limited to 'data/searxng') diff --git a/data/searxng/searxng.conf b/data/searxng/searxng.conf new file mode 100644 index 0000000..7102d60 --- /dev/null +++ b/data/searxng/searxng.conf @@ -0,0 +1,48 @@ +server { + + listen 443 ssl; + ssl_certificate /etc/letsencrypt/live/chudnick.com/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/chudnick.com/privkey.pem; + ssl_stapling on; + ssl_stapling_verify on; + + # Your server name + server_name searxng.chudnick.com; + + # If you want to log user activity, comment these + access_log /dev/null; + error_log /dev/null; + + # Security Headers + add_header X-Frame-Options "SAMEORIGIN"; + add_header X-XSS-Protection "1; mode=block"; + add_header X-Content-Type-Options "nosniff"; + + location = / { + return 302 https://$host/searxng; + } + + # Searx reverse proxy + location /searxng { + proxy_pass http://127.0.0.1:8080; + + proxy_set_header Host $host; + proxy_set_header Connection $http_connection; + + # see flaskfix.py + proxy_set_header X-Scheme $scheme; + proxy_set_header X-Script-Name /searxng; + + # see limiter.py + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + + } +} + +server { + listen 80; + listen [::]:80; + server_name searxng.chudnick.com; + return 301 https://$host$request_uri; +} diff --git a/data/searxng/settings.yml b/data/searxng/settings.yml new file mode 100644 index 0000000..6ff425f --- /dev/null +++ b/data/searxng/settings.yml @@ -0,0 +1,74 @@ +# SearXNG settings, before editing this file read: +# +# https://docs.searxng.org/admin/engines/settings.html + +use_default_settings: + engines: + remove: + - 1337x + - btdigg + - kickass + - nyaa + - piratebay + - solidtorrents + - tokyotoshokan + - z-library + - google + +general: + debug: false + instance_name: "SearXNG" + +search: + safe_search: 0 + autocomplete: '' + default_lang: '' + formats: + - html + +server: + base_url: searxng.chudnick.com + secret_key: "changeme" # change this! + image_proxy: true + limiter: false + http_protocol_version: "1.1" + default_http_headers: + X-Content-Type-Options: nosniff + X-XSS-Protection: 1; mode=block + X-Download-Options: noopen + X-Robots-Tag: noindex, nofollow + Referrer-Policy: no-referrer + +redis: + url: redis://redis:6379/0 + +ui: + static_use_hash: true + results_on_new_tab: false + default_theme: simple + theme_args: + simple_style: dark + +enabled_plugins: + - 'Hash plugin' + - 'Search on category select' + - 'Self Informations' + - 'Tracker URL remover' + - 'Ahmia blacklist' + +engines: + - name: free software directory + disabled: false + + - name: gitlab + disabled: false + + - name: wiby + disabled: true + + - name: hoogle + disabled: true + + - name: mankier + disabled: true + diff --git a/data/searxng/uwsgi.ini b/data/searxng/uwsgi.ini new file mode 100644 index 0000000..3aab8dd --- /dev/null +++ b/data/searxng/uwsgi.ini @@ -0,0 +1,50 @@ +[uwsgi] +# Who will run the code +uid = searxng +gid = searxng + +# Number of workers (usually CPU count) +workers = 1 +threads = 1 + +# The right granted on the created socket +chmod-socket = 666 + +# Plugin to use and interpreter config +single-interpreter = true +master = true +plugin = python3 +lazy-apps = true +enable-threads = true + +# Module to import +module = searx.webapp + +# Virtualenv and python path +pythonpath = /usr/local/searxng/ +chdir = /usr/local/searxng/searx/ + +# automatically set processes name to something meaningful +auto-procname = true + +# Disable request logging for privacy +disable-logging = true +log-5xx = true + +# Set the max size of a request (request-body excluded) +buffer-size = 8192 + +# No keep alive +# See https://github.com/searx/searx-docker/issues/24 +add-header = Connection: close + +# uwsgi serves the static files +# expires set to one year since there are hashes +static-map = /static=/usr/local/searxng/searx/static +static-expires = /* 31557600 +static-gzip-all = True +offload-threads = %k + +# Cache +cache2 = name=searxngcache,items=2000,blocks=2000,blocksize=4096,bitmap=1 + -- cgit v1.2.3