mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01:00
Rename all from searx to searxng
This commit is contained in:
parent
a582cf3d82
commit
ac05f0943c
682 changed files with 58450 additions and 58450 deletions
|
|
@ -1,6 +1,6 @@
|
|||
[theme]
|
||||
inherit = pocoo
|
||||
stylesheet = searx.css
|
||||
stylesheet = searxng.css
|
||||
|
||||
[options]
|
||||
touch_icon =
|
||||
|
|
@ -59,7 +59,7 @@ Sample response
|
|||
"shortcut": "bb"
|
||||
},
|
||||
],
|
||||
"instance_name": "searx",
|
||||
"instance_name": "searxng",
|
||||
"locales": {
|
||||
"de": "Deutsch (German)",
|
||||
"en": "English",
|
||||
|
|
|
|||
|
|
@ -8,26 +8,26 @@ digraph G {
|
|||
filtron [label="Filtron", href="https://searxng.github.io/searxng/utils/filtron.sh.html"];
|
||||
morty [label="Morty", href="https://searxng.github.io/searxng/utils/morty.sh.html"];
|
||||
static [label="Static files", href="url to configure static files"];
|
||||
uwsgi [label="uwsgi", href="https://searxng.github.io/searxng/utils/searx.sh.html"]
|
||||
searx1 [label="Searx #1"];
|
||||
searx2 [label="Searx #2"];
|
||||
searx3 [label="Searx #3"];
|
||||
searx4 [label="Searx #4"];
|
||||
uwsgi [label="uwsgi", href="https://searxng.github.io/searxng/utils/searxng.sh.html"]
|
||||
searxng1 [label="Searxng #1"];
|
||||
searxng2 [label="Searxng #2"];
|
||||
searxng3 [label="Searxng #3"];
|
||||
searxng4 [label="Searxng #4"];
|
||||
|
||||
browser -> rp [label="HTTPS"]
|
||||
|
||||
subgraph cluster_searx {
|
||||
label = "Searx instance" fontname="Sans";
|
||||
subgraph cluster_searxng {
|
||||
label = "Searxng instance" fontname="Sans";
|
||||
bgcolor="#fafafa";
|
||||
{ rank=same; static rp };
|
||||
rp -> morty [label="optional: images and HTML pages proxy"];
|
||||
rp -> static [label="optional: reverse proxy serves directly static files"];
|
||||
rp -> filtron [label="HTTP"];
|
||||
filtron -> uwsgi [label="HTTP"];
|
||||
uwsgi -> searx1;
|
||||
uwsgi -> searx2;
|
||||
uwsgi -> searx3;
|
||||
uwsgi -> searx4;
|
||||
uwsgi -> searxng1;
|
||||
uwsgi -> searxng2;
|
||||
uwsgi -> searxng3;
|
||||
uwsgi -> searxng4;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,17 +6,17 @@ Architecture
|
|||
|
||||
.. sidebar:: Further reading
|
||||
|
||||
- Reverse Proxy: :ref:`Apache <apache searx site>` & :ref:`nginx <nginx searx
|
||||
- Reverse Proxy: :ref:`Apache <apache searxng site>` & :ref:`nginx <nginx searxng
|
||||
site>`
|
||||
- Filtron: :ref:`searx filtron`
|
||||
- Morty: :ref:`searx morty`
|
||||
- uWSGI: :ref:`searx uwsgi`
|
||||
- Searx: :ref:`installation basic`
|
||||
- Filtron: :ref:`searxng filtron`
|
||||
- Morty: :ref:`searxng morty`
|
||||
- uWSGI: :ref:`searxng uwsgi`
|
||||
- Searxng: :ref:`installation basic`
|
||||
|
||||
Herein you will find some hints and suggestions about typical architectures of
|
||||
SearXNG infrastructures.
|
||||
|
||||
We start with a contribution from :pull-searx:`@dalf <1776#issuecomment-567917320>`.
|
||||
We start with a contribution from :pull-searxng:`@dalf <1776#issuecomment-567917320>`.
|
||||
It shows a *reference* setup for public SearXNG instances which can build up and
|
||||
maintained by the scripts from our :ref:`toolboxing`.
|
||||
|
||||
|
|
|
|||
|
|
@ -15,19 +15,19 @@ Buildhosts
|
|||
:backlinks: entry
|
||||
|
||||
To get best results from build, its recommend to install additional packages
|
||||
on build hosts (see :ref:`searx.sh`).::
|
||||
on build hosts (see :ref:`searxng.sh`).::
|
||||
|
||||
sudo -H ./utils/searx.sh install buildhost
|
||||
sudo -H ./utils/searxng.sh install buildhost
|
||||
|
||||
This will install packages needed by searx:
|
||||
This will install packages needed by searxng:
|
||||
|
||||
.. kernel-include:: $DOCS_BUILD/includes/searx.rst
|
||||
.. kernel-include:: $DOCS_BUILD/includes/searxng.rst
|
||||
:start-after: START distro-packages
|
||||
:end-before: END distro-packages
|
||||
|
||||
and packages needed to build docuemtation and run tests:
|
||||
|
||||
.. kernel-include:: $DOCS_BUILD/includes/searx.rst
|
||||
.. kernel-include:: $DOCS_BUILD/includes/searxng.rst
|
||||
:start-after: START build-packages
|
||||
:end-before: END build-packages
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ Command Line Engines
|
|||
|
||||
.. sidebar:: info
|
||||
|
||||
- :origin:`command.py <searx/engines/command.py>`
|
||||
- :origin:`command.py <searxng/engines/command.py>`
|
||||
- :ref:`offline engines`
|
||||
|
||||
With *command engines* administrators can run engines to integrate arbitrary
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ Explanation of the :ref:`general engine configuration` shown in the table
|
|||
Show errors **DE**
|
||||
============= =========== =================================
|
||||
|
||||
.. jinja:: searx
|
||||
.. jinja:: searxng
|
||||
|
||||
.. flat-table:: Engines configured at built time (defaults)
|
||||
:header-rows: 1
|
||||
|
|
|
|||
|
|
@ -20,4 +20,4 @@ Engines & Settings
|
|||
nosql-engines
|
||||
search-indexer-engines
|
||||
command-line-engines
|
||||
searx.engines.xpath
|
||||
searxng.engines.xpath
|
||||
|
|
|
|||
|
|
@ -14,17 +14,17 @@ The following `NoSQL databases`_ are supported:
|
|||
- :ref:`engine mongodb`
|
||||
|
||||
All of the engines above are just commented out in the :origin:`settings.yml
|
||||
<searx/settings.yml>`, as you have to set various options and install
|
||||
<searxng/settings.yml>`, as you have to set various options and install
|
||||
dependencies before using them.
|
||||
|
||||
By default, the engines use the ``key-value`` template for displaying results /
|
||||
see :origin:`oscar <searx/templates/oscar/result_templates/key-value.html>` &
|
||||
:origin:`simple <searx/templates/simple/result_templates/key-value.html>`
|
||||
see :origin:`oscar <searxng/templates/oscar/result_templates/key-value.html>` &
|
||||
:origin:`simple <searxng/templates/simple/result_templates/key-value.html>`
|
||||
themes. If you are not satisfied with the original result layout, you can use
|
||||
your own template, set ``result_template`` attribute to ``{template_name}`` and
|
||||
place the templates at::
|
||||
|
||||
searx/templates/{theme_name}/result_templates/{template_name}
|
||||
searxng/templates/{theme_name}/result_templates/{template_name}
|
||||
|
||||
Futhermore, if you do not wish to expose these engines on a public instance, you
|
||||
can still add them and limit the access by setting ``tokens`` as described in
|
||||
|
|
@ -43,11 +43,11 @@ Extra Dependencies
|
|||
|
||||
For using :ref:`engine redis_server` or :ref:`engine mongodb` you need to
|
||||
install additional packages in Python's Virtual Environment of your SearXNG
|
||||
instance. To switch into the environment (:ref:`searx-src`) you can use
|
||||
:ref:`searx.sh`::
|
||||
instance. To switch into the environment (:ref:`searxng-src`) you can use
|
||||
:ref:`searxng.sh`::
|
||||
|
||||
$ sudo utils/searx.sh shell
|
||||
(searx-pyenv)$ pip install ...
|
||||
$ sudo utils/searxng.sh shell
|
||||
(searxng-pyenv)$ pip install ...
|
||||
|
||||
|
||||
.. _engine redis_server:
|
||||
|
|
@ -61,7 +61,7 @@ Redis Server
|
|||
|
||||
- ``pip install`` redis_
|
||||
- redis.io_
|
||||
- :origin:`redis_server.py <searx/engines/redis_server.py>`
|
||||
- :origin:`redis_server.py <searxng/engines/redis_server.py>`
|
||||
|
||||
|
||||
Redis is an open source (BSD licensed), in-memory data structure (key value
|
||||
|
|
@ -98,7 +98,7 @@ MongoDB
|
|||
|
||||
- ``pip install`` pymongo_
|
||||
- MongoDB_
|
||||
- :origin:`mongodb.py <searx/engines/mongodb.py>`
|
||||
- :origin:`mongodb.py <searxng/engines/mongodb.py>`
|
||||
|
||||
MongoDB_ is a document based database program that handles JSON like data.
|
||||
Before configuring the ``mongodb`` engine, you must install the dependency
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ Recoll Engine
|
|||
|
||||
- `Recoll <https://www.lesbonscomptes.com/recoll/>`_
|
||||
- `recoll-webui <https://framagit.org/medoc92/recollwebui.git>`_
|
||||
- :origin:`searx/engines/recoll.py`
|
||||
- :origin:`searxng/engines/recoll.py`
|
||||
|
||||
Recoll_ is a desktop full-text search tool based on Xapian. By itself Recoll_
|
||||
does not offer WEB or API access, this can be achieved using recoll-webui_
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ MeiliSearch
|
|||
|
||||
.. sidebar:: info
|
||||
|
||||
- :origin:`meilisearch.py <searx/engines/meilisearch.py>`
|
||||
- :origin:`meilisearch.py <searxng/engines/meilisearch.py>`
|
||||
- `MeiliSearch <https://www.meilisearch.com>`_
|
||||
- `MeiliSearch Documentation <https://docs.meilisearch.com/>`_
|
||||
- `Install MeiliSearch
|
||||
|
|
@ -65,7 +65,7 @@ Elasticsearch
|
|||
|
||||
.. sidebar:: info
|
||||
|
||||
- :origin:`elasticsearch.py <searx/engines/elasticsearch.py>`
|
||||
- :origin:`elasticsearch.py <searxng/engines/elasticsearch.py>`
|
||||
- `Elasticsearch <https://www.elastic.co/elasticsearch/>`_
|
||||
- `Elasticsearch Guide
|
||||
<https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html>`_
|
||||
|
|
@ -107,7 +107,7 @@ Solr
|
|||
|
||||
.. sidebar:: info
|
||||
|
||||
- :origin:`solr.py <searx/engines/solr.py>`
|
||||
- :origin:`solr.py <searxng/engines/solr.py>`
|
||||
- `Solr <https://solr.apache.org>`_
|
||||
- `Solr Resources <https://solr.apache.org/resources.html>`_
|
||||
- `Install Solr <https://solr.apache.org/guide/installing-solr.html>`_
|
||||
|
|
|
|||
|
|
@ -4,6 +4,6 @@
|
|||
XPath Engine
|
||||
============
|
||||
|
||||
.. automodule:: searx.engines.xpath
|
||||
.. automodule:: searxng.engines.xpath
|
||||
:members:
|
||||
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
``settings.yml``
|
||||
================
|
||||
|
||||
This page describe the options possibilities of the :origin:`searx/settings.yml`
|
||||
This page describe the options possibilities of the :origin:`searxng/settings.yml`
|
||||
file.
|
||||
|
||||
.. sidebar:: Further reading ..
|
||||
|
|
@ -24,11 +24,11 @@ settings.yml location
|
|||
|
||||
The initial ``settings.yml`` we be load from these locations:
|
||||
|
||||
1. the full path specified in the ``SEARX_SETTINGS_PATH`` environment variable.
|
||||
2. ``/etc/searx/settings.yml``
|
||||
1. the full path specified in the ``SEARXNG_SETTINGS_PATH`` environment variable.
|
||||
2. ``/etc/searxng/settings.yml``
|
||||
|
||||
If these files don't exist (or are empty or can't be read), SearXNG uses the
|
||||
:origin:`searx/settings.yml` file. Read :ref:`settings use_default_settings` to
|
||||
:origin:`searxng/settings.yml` file. Read :ref:`settings use_default_settings` to
|
||||
see how you can simplify your *user defined* ``settings.yml``.
|
||||
|
||||
|
||||
|
|
@ -74,7 +74,7 @@ Global Settings
|
|||
instance_name: "SearXNG" # displayed name
|
||||
contact_url: false # mailto:contact@example.com
|
||||
|
||||
``debug`` : ``$SEARX_DEBUG``
|
||||
``debug`` : ``$SEARXNG_DEBUG``
|
||||
Allow a more detailed log if you run SearXNG directly. Display *detailed* error
|
||||
messages in the browser too, so this must be deactivated in production.
|
||||
|
||||
|
|
@ -94,7 +94,7 @@ Global Settings
|
|||
port: 8888
|
||||
bind_address: "127.0.0.1" # address to listen on
|
||||
secret_key: "ultrasecretkey" # change this!
|
||||
image_proxy: false # proxying image results through searx
|
||||
image_proxy: false # proxying image results through searxng
|
||||
default_locale: "" # default interface locale
|
||||
default_theme: oscar # ui theme
|
||||
default_http_headers:
|
||||
|
|
@ -109,17 +109,17 @@ Global Settings
|
|||
Changing a value tagged by :ref:`buildenv <make buildenv>`, needs to
|
||||
rebuild instance's environment :ref:`utils/brand.env <make buildenv>`.
|
||||
|
||||
``base_url`` : :ref:`buildenv SEARX_URL <make buildenv>`
|
||||
``base_url`` : :ref:`buildenv SEARXNG_URL <make buildenv>`
|
||||
The base URL where SearXNG is deployed. Used to create correct inbound links.
|
||||
If you change the value, don't forget to rebuild instance's environment
|
||||
(:ref:`utils/brand.env <make buildenv>`)
|
||||
|
||||
``port`` & ``bind_address``: :ref:`buildenv SEARX_PORT & SEARX_BIND_ADDRESS <make buildenv>`
|
||||
``port`` & ``bind_address``: :ref:`buildenv SEARXNG_PORT & SEARXNG_BIND_ADDRESS <make buildenv>`
|
||||
Port number and *bind address* of the SearXNG web application if you run it
|
||||
directly using ``python searx/webapp.py``. Doesn't apply to SearXNG running on
|
||||
directly using ``python searxng/webapp.py``. Doesn't apply to SearXNG running on
|
||||
Apache or Nginx.
|
||||
|
||||
``secret_key`` : ``$SEARX_SECRET``
|
||||
``secret_key`` : ``$SEARXNG_SECRET``
|
||||
Used for cryptography purpose.
|
||||
|
||||
``image_proxy`` :
|
||||
|
|
@ -128,7 +128,7 @@ Global Settings
|
|||
``default_locale`` :
|
||||
SearXNG interface language. If blank, the locale is detected by using the
|
||||
browser language. If it doesn't work, or you are deploying a language
|
||||
specific instance of searx, a locale can be defined using an ISO language
|
||||
specific instance of searxng, a locale can be defined using an ISO language
|
||||
code, like ``fr``, ``en``, ``de``.
|
||||
|
||||
``default_theme`` :
|
||||
|
|
@ -137,7 +137,7 @@ Global Settings
|
|||
.. _HTTP headers: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers
|
||||
|
||||
``default_http_headers``:
|
||||
Set additional HTTP headers, see `#755 <https://github.com/searx/searx/issues/715>`__
|
||||
Set additional HTTP headers, see `#755 <https://github.com/searxng/searxng/issues/715>`__
|
||||
|
||||
``outgoing:``
|
||||
-------------
|
||||
|
|
@ -293,7 +293,7 @@ engine is shown. Most of the options have a default value or even are optional.
|
|||
|
||||
``timeout`` : optional
|
||||
Timeout of the search with the current search engine. **Be careful, it will
|
||||
modify the global timeout of searx.**
|
||||
modify the global timeout of searxng.**
|
||||
|
||||
``api_key`` : optional
|
||||
In a few cases, using an API needs the use of a secret key. How to obtain them
|
||||
|
|
@ -339,16 +339,16 @@ use_default_settings
|
|||
|
||||
- :ref:`settings location`
|
||||
- :ref:`use_default_settings.yml`
|
||||
- :origin:`/etc/searx/settings.yml <utils/templates/etc/searx/use_default_settings.yml>`
|
||||
- :origin:`/etc/searxng/settings.yml <utils/templates/etc/searxng/use_default_settings.yml>`
|
||||
|
||||
The user defined ``settings.yml`` is loaded from the :ref:`settings location`
|
||||
and can relied on the default configuration :origin:`searx/settings.yml` using:
|
||||
and can relied on the default configuration :origin:`searxng/settings.yml` using:
|
||||
|
||||
``use_default_settings: true``
|
||||
|
||||
``server:``
|
||||
In the following example, the actual settings are the default settings defined
|
||||
in :origin:`searx/settings.yml` with the exception of the ``secret_key`` and
|
||||
in :origin:`searxng/settings.yml` with the exception of the ``secret_key`` and
|
||||
the ``bind_address``:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ Relational Database Management System (RDBMS) are supported:
|
|||
- :ref:`engine mysql_server`
|
||||
|
||||
All of the engines above are just commented out in the :origin:`settings.yml
|
||||
<searx/settings.yml>`, as you have to set the required attributes for the
|
||||
<searxng/settings.yml>`, as you have to set the required attributes for the
|
||||
engines, e.g. ``database:`` ...
|
||||
|
||||
.. code:: yaml
|
||||
|
|
@ -30,13 +30,13 @@ engines, e.g. ``database:`` ...
|
|||
query_str: ...
|
||||
|
||||
By default, the engines use the ``key-value`` template for displaying results /
|
||||
see :origin:`oscar <searx/templates/oscar/result_templates/key-value.html>` &
|
||||
:origin:`simple <searx/templates/simple/result_templates/key-value.html>`
|
||||
see :origin:`oscar <searxng/templates/oscar/result_templates/key-value.html>` &
|
||||
:origin:`simple <searxng/templates/simple/result_templates/key-value.html>`
|
||||
themes. If you are not satisfied with the original result layout, you can use
|
||||
your own template, set ``result_template`` attribute to ``{template_name}`` and
|
||||
place the templates at::
|
||||
|
||||
searx/templates/{theme_name}/result_templates/{template_name}
|
||||
searxng/templates/{theme_name}/result_templates/{template_name}
|
||||
|
||||
If you do not wish to expose these engines on a public instance, you can still
|
||||
add them and limit the access by setting ``tokens`` as described in section
|
||||
|
|
@ -63,7 +63,7 @@ SQLite
|
|||
|
||||
.. sidebar:: info
|
||||
|
||||
- :origin:`sqlite.py <searx/engines/sqlite.py>`
|
||||
- :origin:`sqlite.py <searxng/engines/sqlite.py>`
|
||||
|
||||
.. _MediathekView: https://mediathekview.de/
|
||||
|
||||
|
|
@ -74,7 +74,7 @@ this example of the SQlite engine download the database:
|
|||
|
||||
- https://liste.mediathekview.de/filmliste-v2.db.bz2
|
||||
|
||||
and unpack into ``searx/data/filmliste-v2.db``. To search the database use e.g
|
||||
and unpack into ``searxng/data/filmliste-v2.db``. To search the database use e.g
|
||||
Query to test: ``!mediathekview concert``
|
||||
|
||||
.. code:: yaml
|
||||
|
|
@ -84,7 +84,7 @@ Query to test: ``!mediathekview concert``
|
|||
disabled: False
|
||||
categories: general
|
||||
result_template: default.html
|
||||
database: searx/data/filmliste-v2.db
|
||||
database: searxng/data/filmliste-v2.db
|
||||
query_str: >-
|
||||
SELECT title || ' (' || time(duration, 'unixepoch') || ')' AS title,
|
||||
COALESCE( NULLIF(url_video_hd,''), NULLIF(url_video_sd,''), url_video) AS url,
|
||||
|
|
@ -99,11 +99,11 @@ Extra Dependencies
|
|||
|
||||
For using :ref:`engine postgresql` or :ref:`engine mysql_server` you need to
|
||||
install additional packages in Python's Virtual Environment of your SearXNG
|
||||
instance. To switch into the environment (:ref:`searx-src`) you can use
|
||||
:ref:`searx.sh`::
|
||||
instance. To switch into the environment (:ref:`searxng-src`) you can use
|
||||
:ref:`searxng.sh`::
|
||||
|
||||
$ sudo utils/searx.sh shell
|
||||
(searx-pyenv)$ pip install ...
|
||||
$ sudo utils/searxng.sh shell
|
||||
(searxng-pyenv)$ pip install ...
|
||||
|
||||
|
||||
.. _engine postgresql:
|
||||
|
|
@ -115,7 +115,7 @@ PostgreSQL
|
|||
|
||||
.. sidebar:: info
|
||||
|
||||
- :origin:`postgresql.py <searx/engines/postgresql.py>`
|
||||
- :origin:`postgresql.py <searxng/engines/postgresql.py>`
|
||||
- ``pip install`` psycopg2_
|
||||
|
||||
PostgreSQL is a powerful and robust open source database. Before configuring
|
||||
|
|
@ -127,7 +127,7 @@ find an example configuration below:
|
|||
- name: my_database
|
||||
engine: postgresql
|
||||
database: my_database
|
||||
username: searx
|
||||
username: searxng
|
||||
password: password
|
||||
query_str: 'SELECT * from my_table WHERE my_column = %(query)s'
|
||||
|
||||
|
|
@ -140,7 +140,7 @@ MySQL
|
|||
|
||||
.. sidebar:: info
|
||||
|
||||
- :origin:`mysql_server.py <searx/engines/mysql_server.py>`
|
||||
- :origin:`mysql_server.py <searxng/engines/mysql_server.py>`
|
||||
- ``pip install`` mysql-connector-python_
|
||||
|
||||
MySQL is said to be the most popular open source database. Before enabling MySQL
|
||||
|
|
@ -155,7 +155,7 @@ example configuration for quering a MySQL server:
|
|||
- name: my_database
|
||||
engine: mysql_server
|
||||
database: my_database
|
||||
username: searx
|
||||
username: searxng
|
||||
password: password
|
||||
limit: 5
|
||||
query_str: 'SELECT * from my_table WHERE my_column=%(query)s'
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
.. _searx filtron:
|
||||
.. _searxng filtron:
|
||||
|
||||
==========================
|
||||
How to protect an instance
|
||||
|
|
@ -8,7 +8,7 @@ How to protect an instance
|
|||
.. sidebar:: further reading
|
||||
|
||||
- :ref:`filtron.sh`
|
||||
- :ref:`nginx searx site`
|
||||
- :ref:`nginx searxng site`
|
||||
|
||||
|
||||
.. contents:: Contents
|
||||
|
|
@ -19,10 +19,10 @@ How to protect an instance
|
|||
.. _filtron: https://github.com/asciimoo/filtron
|
||||
|
||||
SearXNG depends on external search services. To avoid the abuse of these services
|
||||
it is advised to limit the number of requests processed by searx.
|
||||
it is advised to limit the number of requests processed by searxng.
|
||||
|
||||
An application firewall, filtron_ solves exactly this problem. Filtron is just
|
||||
a middleware between your web server (nginx, apache, ...) and searx, we describe
|
||||
a middleware between your web server (nginx, apache, ...) and searxng, we describe
|
||||
such infratructures in chapter: :ref:`architecture`.
|
||||
|
||||
|
||||
|
|
@ -168,9 +168,9 @@ Use it along with ``nginx`` with the following example configuration.
|
|||
|
||||
.. code:: nginx
|
||||
|
||||
# https://example.org/searx
|
||||
# https://example.org/searxng
|
||||
|
||||
location /searx {
|
||||
location /searxng {
|
||||
proxy_pass http://127.0.0.1:4004/;
|
||||
|
||||
proxy_set_header Host $host;
|
||||
|
|
@ -178,14 +178,14 @@ Use it along with ``nginx`` with the following example configuration.
|
|||
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;
|
||||
proxy_set_header X-Script-Name /searxng;
|
||||
}
|
||||
|
||||
location /searx/static {
|
||||
/usr/local/searx/searx-src/searx/static;
|
||||
location /searxng/static {
|
||||
/usr/local/searxng/searxng-src/searxng/static;
|
||||
}
|
||||
|
||||
|
||||
Requests are coming from port 4004 going through filtron and then forwarded to
|
||||
port 8888 where a SearXNG is being run. For a complete setup see: :ref:`nginx
|
||||
searx site`.
|
||||
searxng site`.
|
||||
|
|
|
|||
|
|
@ -7,12 +7,12 @@ Administrator documentation
|
|||
:caption: Contents
|
||||
|
||||
installation
|
||||
installation-searx
|
||||
installation-searxng
|
||||
installation-uwsgi
|
||||
installation-nginx
|
||||
installation-apache
|
||||
installation-docker
|
||||
update-searx
|
||||
update-searxng
|
||||
engines/index
|
||||
api
|
||||
architecture
|
||||
|
|
|
|||
|
|
@ -47,13 +47,13 @@ Install with apache
|
|||
|
||||
----
|
||||
|
||||
**Install** :ref:`apache searx site` using :ref:`filtron.sh <filtron.sh overview>`
|
||||
**Install** :ref:`apache searxng site` using :ref:`filtron.sh <filtron.sh overview>`
|
||||
|
||||
.. code:: bash
|
||||
|
||||
$ sudo -H ./utils/filtron.sh apache install
|
||||
|
||||
**Install** :ref:`apache searx site` using :ref:`morty.sh <morty.sh overview>`
|
||||
**Install** :ref:`apache searxng site` using :ref:`morty.sh <morty.sh overview>`
|
||||
|
||||
.. code:: bash
|
||||
|
||||
|
|
@ -163,7 +163,7 @@ How this default intro site is configured, depends on the linux distribution
|
|||
|
||||
less /etc/httpd/conf.d/welcome.conf
|
||||
|
||||
.. _apache searx site:
|
||||
.. _apache searxng site:
|
||||
|
||||
Apache Reverse Proxy
|
||||
====================
|
||||
|
|
@ -192,14 +192,14 @@ except in :ref:`The Debian Layout`.
|
|||
sudo -H a2enmod proxy
|
||||
sudo -H a2enmod proxy_http
|
||||
|
||||
In :ref:`The Debian Layout` you create a ``searx.conf`` with the
|
||||
``<Location /searx >`` directive and save this file in the *sites
|
||||
In :ref:`The Debian Layout` you create a ``searxng.conf`` with the
|
||||
``<Location /searxng >`` directive and save this file in the *sites
|
||||
available* folder at ``/etc/apache2/sites-available``. To enable the
|
||||
``searx.conf`` use :man:`a2ensite`:
|
||||
``searxng.conf`` use :man:`a2ensite`:
|
||||
|
||||
.. code:: sh
|
||||
|
||||
sudo -H a2ensite searx.conf
|
||||
sudo -H a2ensite searxng.conf
|
||||
|
||||
.. group-tab:: Arch Linux
|
||||
|
||||
|
|
@ -230,7 +230,7 @@ except in :ref:`The Debian Layout`.
|
|||
With ProxyPreserveHost_ the incoming Host HTTP request header is passed to the
|
||||
proxied host.
|
||||
|
||||
.. _apache searx via filtron plus morty:
|
||||
.. _apache searxng via filtron plus morty:
|
||||
|
||||
.. tabs::
|
||||
|
||||
|
|
@ -244,9 +244,9 @@ proxied host.
|
|||
|
||||
.. code:: apache
|
||||
|
||||
<Location /searx >
|
||||
<Location /searxng >
|
||||
|
||||
# SetEnvIf Request_URI "/searx" dontlog
|
||||
# SetEnvIf Request_URI "/searxng" dontlog
|
||||
# CustomLog /dev/null combined env=dontlog
|
||||
|
||||
Require all granted
|
||||
|
|
@ -258,11 +258,11 @@ proxied host.
|
|||
|
||||
ProxyPreserveHost On
|
||||
ProxyPass http://127.0.0.1:4004
|
||||
RequestHeader set X-Script-Name /searx
|
||||
RequestHeader set X-Script-Name /searxng
|
||||
|
||||
</Location>
|
||||
|
||||
2. Configure reverse proxy for :ref:`morty <searx morty>`, listening on
|
||||
2. Configure reverse proxy for :ref:`morty <searxng morty>`, listening on
|
||||
*localhost 3000*
|
||||
|
||||
.. code:: apache
|
||||
|
|
@ -286,8 +286,8 @@ proxied host.
|
|||
|
||||
</Location>
|
||||
|
||||
For a fully result proxification add :ref:`morty's <searx morty>` **public
|
||||
URL** to your :origin:`searx/settings.yml`:
|
||||
For a fully result proxification add :ref:`morty's <searxng morty>` **public
|
||||
URL** to your :origin:`searxng/settings.yml`:
|
||||
|
||||
.. code:: yaml
|
||||
|
||||
|
|
@ -302,10 +302,10 @@ proxied host.
|
|||
uWSGI support
|
||||
=============
|
||||
|
||||
Be warned, with this setup, your instance isn't :ref:`protected <searx
|
||||
Be warned, with this setup, your instance isn't :ref:`protected <searxng
|
||||
filtron>`, nevertheless it is good enough for intranet usage. In modern Linux
|
||||
distributions, the `mod_proxy_uwsgi`_ is compiled into the *normal* apache
|
||||
package and you need to install only the :ref:`uWSGI <searx uwsgi>` package:
|
||||
package and you need to install only the :ref:`uWSGI <searxng uwsgi>` package:
|
||||
|
||||
.. tabs::
|
||||
|
||||
|
|
@ -334,15 +334,15 @@ The next example shows a configuration using the `uWSGI Apache support`_ via
|
|||
unix sockets and `mod_proxy_uwsgi`_.
|
||||
|
||||
For socket communication, you have to activate ``socket =
|
||||
/run/uwsgi/app/searx/socket`` and comment out the ``http = 127.0.0.1:8888``
|
||||
/run/uwsgi/app/searxng/socket`` and comment out the ``http = 127.0.0.1:8888``
|
||||
configuration in your :ref:`uwsgi ini file <uwsgi configuration>`. If not
|
||||
already exists, create a folder for the unix sockets, which can be used by the
|
||||
searx account (see :ref:`create searx user`):
|
||||
searxng account (see :ref:`create searxng user`):
|
||||
|
||||
.. code:: bash
|
||||
|
||||
sudo -H mkdir -p /run/uwsgi/app/searx/
|
||||
sudo -H chown -R searx:searx /run/uwsgi/app/searx/
|
||||
sudo -H mkdir -p /run/uwsgi/app/searxng/
|
||||
sudo -H chown -R searxng:searxng /run/uwsgi/app/searxng/
|
||||
|
||||
If the server is public; to limit access to your intranet replace ``Allow from
|
||||
all`` directive and replace ``192.168.0.0/16`` with your subnet IP/class.
|
||||
|
|
@ -357,10 +357,10 @@ all`` directive and replace ``192.168.0.0/16`` with your subnet IP/class.
|
|||
LoadModule proxy_module /usr/lib/apache2/modules/mod_proxy.so
|
||||
LoadModule proxy_uwsgi_module /usr/lib/apache2/modules/mod_proxy_uwsgi.so
|
||||
|
||||
# SetEnvIf Request_URI /searx dontlog
|
||||
# SetEnvIf Request_URI /searxng dontlog
|
||||
# CustomLog /dev/null combined env=dontlog
|
||||
|
||||
<Location /searx>
|
||||
<Location /searxng>
|
||||
|
||||
Require all granted
|
||||
Order deny,allow
|
||||
|
|
@ -369,7 +369,7 @@ all`` directive and replace ``192.168.0.0/16`` with your subnet IP/class.
|
|||
Allow from all
|
||||
|
||||
ProxyPreserveHost On
|
||||
ProxyPass unix:/run/uwsgi/app/searx/socket|uwsgi://uwsgi-uds-searx/
|
||||
ProxyPass unix:/run/uwsgi/app/searxng/socket|uwsgi://uwsgi-uds-searxng/
|
||||
|
||||
</Location>
|
||||
|
||||
|
|
@ -382,10 +382,10 @@ all`` directive and replace ``192.168.0.0/16`` with your subnet IP/class.
|
|||
LoadModule proxy_module modules/mod_proxy.so
|
||||
LoadModule proxy_uwsgi_module modules/mod_proxy_uwsgi.so
|
||||
|
||||
# SetEnvIf Request_URI /searx dontlog
|
||||
# SetEnvIf Request_URI /searxng dontlog
|
||||
# CustomLog /dev/null combined env=dontlog
|
||||
|
||||
<Location /searx>
|
||||
<Location /searxng>
|
||||
|
||||
Require all granted
|
||||
Order deny,allow
|
||||
|
|
@ -394,7 +394,7 @@ all`` directive and replace ``192.168.0.0/16`` with your subnet IP/class.
|
|||
Allow from all
|
||||
|
||||
ProxyPreserveHost On
|
||||
ProxyPass unix:/run/uwsgi/app/searx/socket|uwsgi://uwsgi-uds-searx/
|
||||
ProxyPass unix:/run/uwsgi/app/searxng/socket|uwsgi://uwsgi-uds-searxng/
|
||||
|
||||
</Location>
|
||||
|
||||
|
|
@ -408,10 +408,10 @@ all`` directive and replace ``192.168.0.0/16`` with your subnet IP/class.
|
|||
LoadModule proxy_uwsgi_module modules/mod_proxy_uwsgi.so
|
||||
<IfModule proxy_uwsgi_module>
|
||||
|
||||
# SetEnvIf Request_URI /searx dontlog
|
||||
# SetEnvIf Request_URI /searxng dontlog
|
||||
# CustomLog /dev/null combined env=dontlog
|
||||
|
||||
<Location /searx>
|
||||
<Location /searxng>
|
||||
|
||||
Require all granted
|
||||
Order deny,allow
|
||||
|
|
@ -420,7 +420,7 @@ all`` directive and replace ``192.168.0.0/16`` with your subnet IP/class.
|
|||
Allow from all
|
||||
|
||||
ProxyPreserveHost On
|
||||
ProxyPass unix:/run/uwsgi/app/searx/socket|uwsgi://uwsgi-uds-searx/
|
||||
ProxyPass unix:/run/uwsgi/app/searxng/socket|uwsgi://uwsgi-uds-searxng/
|
||||
|
||||
</Location>
|
||||
|
||||
|
|
@ -436,16 +436,16 @@ all`` directive and replace ``192.168.0.0/16`` with your subnet IP/class.
|
|||
|
||||
<IfModule mod_uwsgi.c>
|
||||
|
||||
# SetEnvIf Request_URI "/searx" dontlog
|
||||
# SetEnvIf Request_URI "/searxng" dontlog
|
||||
# CustomLog /dev/null combined env=dontlog
|
||||
|
||||
<Location /searx >
|
||||
<Location /searxng >
|
||||
|
||||
Require all granted
|
||||
|
||||
Options FollowSymLinks Indexes
|
||||
SetHandler uwsgi-handler
|
||||
uWSGISocket /run/uwsgi/app/searx/socket
|
||||
uWSGISocket /run/uwsgi/app/searxng/socket
|
||||
|
||||
Order deny,allow
|
||||
Deny from all
|
||||
|
|
@ -468,21 +468,21 @@ Restart service
|
|||
.. code:: sh
|
||||
|
||||
sudo -H systemctl restart apache2
|
||||
sudo -H service uwsgi restart searx
|
||||
sudo -H service uwsgi restart searxng
|
||||
|
||||
.. group-tab:: Arch Linux
|
||||
|
||||
.. code:: sh
|
||||
|
||||
sudo -H systemctl restart httpd
|
||||
sudo -H systemctl restart uwsgi@searx
|
||||
sudo -H systemctl restart uwsgi@searxng
|
||||
|
||||
.. group-tab:: Fedora / RHEL
|
||||
|
||||
.. code:: sh
|
||||
|
||||
sudo -H systemctl restart httpd
|
||||
sudo -H touch /etc/uwsgi.d/searx.ini
|
||||
sudo -H touch /etc/uwsgi.d/searxng.ini
|
||||
|
||||
|
||||
disable logs
|
||||
|
|
@ -492,11 +492,11 @@ For better privacy you can disable Apache logs. In the examples above activate
|
|||
one of the lines and `restart apache`_::
|
||||
|
||||
|
||||
# SetEnvIf Request_URI "/searx" dontlog
|
||||
# SetEnvIf Request_URI "/searxng" dontlog
|
||||
# CustomLog /dev/null combined env=dontlog
|
||||
|
||||
The ``CustomLog`` directive disable logs for the whole (virtual) server, use it
|
||||
when the URL of the service does not have a path component (``/searx``) / is
|
||||
when the URL of the service does not have a path component (``/searxng``) / is
|
||||
located at root (``/``).
|
||||
|
||||
.. _The Debian Layout:
|
||||
|
|
|
|||
|
|
@ -25,8 +25,8 @@ Docker installation
|
|||
If you intend to create a public instance using Docker, use our well
|
||||
maintained searxng-docker_ image which includes
|
||||
|
||||
- :ref:`protection <searx filtron>` `[filtron]`_,
|
||||
- a :ref:`result proxy <searx morty>` `[morty]`_ and
|
||||
- :ref:`protection <searxng filtron>` `[filtron]`_,
|
||||
- a :ref:`result proxy <searxng morty>` `[morty]`_ and
|
||||
- a HTTPS reverse proxy `[caddy]`_.
|
||||
|
||||
Make sure you have `installed Docker <https://docs.docker.com/get-docker/>`_ and
|
||||
|
|
@ -63,7 +63,7 @@ instance using `docker run <https://docs.docker.com/engine/reference/run/>`_:
|
|||
$ docker pull searxng/searxng
|
||||
$ docker run --rm \
|
||||
-d -p ${PORT}:8080 \
|
||||
-v "${PWD}/searx:/etc/searx" \
|
||||
-v "${PWD}/searxng:/etc/searxng" \
|
||||
-e "BASE_URL=http://localhost:$PORT/" \
|
||||
-e "INSTANCE_NAME=my-instance" \
|
||||
searxng/searxng
|
||||
|
|
@ -75,7 +75,7 @@ Open your WEB browser and visit the URL:
|
|||
|
||||
$ xdg-open "http://localhost:$PORT"
|
||||
|
||||
Inside ``${PWD}/searx``, you will find ``settings.yml`` and ``uwsgi.ini``. You
|
||||
Inside ``${PWD}/searxng``, you will find ``settings.yml`` and ``uwsgi.ini``. You
|
||||
can modify these files according to your needs and restart the Docker image.
|
||||
|
||||
.. code:: sh
|
||||
|
|
@ -139,7 +139,7 @@ Build the image
|
|||
It's also possible to build SearXNG from the embedded :origin:`Dockerfile`::
|
||||
|
||||
$ git clone https://github.com/searxng/searxng.git
|
||||
$ cd searx
|
||||
$ cd searxng
|
||||
$ make docker.build
|
||||
...
|
||||
Successfully built 49586c016434
|
||||
|
|
|
|||
|
|
@ -34,13 +34,13 @@ Install with nginx
|
|||
|
||||
----
|
||||
|
||||
**Install** :ref:`nginx searx site` using :ref:`filtron.sh <filtron.sh overview>`
|
||||
**Install** :ref:`nginx searxng site` using :ref:`filtron.sh <filtron.sh overview>`
|
||||
|
||||
.. code:: bash
|
||||
|
||||
$ sudo -H ./utils/filtron.sh nginx install
|
||||
|
||||
**Install** :ref:`nginx searx site` using :ref:`morty.sh <morty.sh overview>`
|
||||
**Install** :ref:`nginx searxng site` using :ref:`morty.sh <morty.sh overview>`
|
||||
|
||||
.. code:: bash
|
||||
|
||||
|
|
@ -126,7 +126,7 @@ depends on the linux distribution:
|
|||
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
|
||||
.. _nginx searx site:
|
||||
.. _nginx searxng site:
|
||||
|
||||
A nginx SearXNG site
|
||||
====================
|
||||
|
|
@ -146,12 +146,12 @@ Started wiki`_ is always a good resource *to keep in the pocket*.
|
|||
|
||||
.. group-tab:: Ubuntu / debian
|
||||
|
||||
Create configuration at ``/etc/nginx/sites-available/searx`` and place a
|
||||
Create configuration at ``/etc/nginx/sites-available/searxng`` and place a
|
||||
symlink to sites-enabled:
|
||||
|
||||
.. code:: sh
|
||||
|
||||
sudo -H ln -s /etc/nginx/sites-available/searx /etc/nginx/sites-enabled/searx
|
||||
sudo -H ln -s /etc/nginx/sites-available/searxng /etc/nginx/sites-enabled/searxng
|
||||
|
||||
.. group-tab:: Arch Linux
|
||||
|
||||
|
|
@ -160,10 +160,10 @@ Started wiki`_ is always a good resource *to keep in the pocket*.
|
|||
|
||||
.. group-tab:: Fedora / RHEL
|
||||
|
||||
Create configuration at ``/etc/nginx/conf.d/searx`` and place a
|
||||
Create configuration at ``/etc/nginx/conf.d/searxng`` and place a
|
||||
symlink to sites-enabled:
|
||||
|
||||
.. _nginx searx via filtron plus morty:
|
||||
.. _nginx searxng via filtron plus morty:
|
||||
|
||||
.. tabs::
|
||||
|
||||
|
|
@ -177,9 +177,9 @@ Started wiki`_ is always a good resource *to keep in the pocket*.
|
|||
|
||||
.. code:: nginx
|
||||
|
||||
# https://example.org/searx
|
||||
# https://example.org/searxng
|
||||
|
||||
location /searx {
|
||||
location /searxng {
|
||||
proxy_pass http://127.0.0.1:4004/;
|
||||
|
||||
proxy_set_header Host $host;
|
||||
|
|
@ -187,15 +187,15 @@ Started wiki`_ is always a good resource *to keep in the pocket*.
|
|||
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;
|
||||
proxy_set_header X-Script-Name /searxng;
|
||||
}
|
||||
|
||||
location /searx/static/ {
|
||||
alias /usr/local/searx/searx-src/searx/static/;
|
||||
location /searxng/static/ {
|
||||
alias /usr/local/searxng/searxng-src/searxng/static/;
|
||||
}
|
||||
|
||||
|
||||
2. Configure reverse proxy for :ref:`morty <searx morty>`, listening on
|
||||
2. Configure reverse proxy for :ref:`morty <searxng morty>`, listening on
|
||||
*localhost 3000*:
|
||||
|
||||
.. code:: nginx
|
||||
|
|
@ -212,8 +212,8 @@ Started wiki`_ is always a good resource *to keep in the pocket*.
|
|||
proxy_set_header X-Scheme $scheme;
|
||||
}
|
||||
|
||||
For a fully result proxification add :ref:`morty's <searx morty>` **public
|
||||
URL** to your :origin:`searx/settings.yml`:
|
||||
For a fully result proxification add :ref:`morty's <searxng morty>` **public
|
||||
URL** to your :origin:`searxng/settings.yml`:
|
||||
|
||||
.. code:: yaml
|
||||
|
||||
|
|
@ -228,10 +228,10 @@ Started wiki`_ is always a good resource *to keep in the pocket*.
|
|||
|
||||
.. group-tab:: proxy or uWSGI
|
||||
|
||||
Be warned, with this setup, your instance isn't :ref:`protected <searx
|
||||
Be warned, with this setup, your instance isn't :ref:`protected <searxng
|
||||
filtron>`. Nevertheless it is good enough for intranet usage and it is a
|
||||
excellent example of; *how different services can be set up*. The next
|
||||
example shows a reverse proxy configuration wrapping the :ref:`searx-uWSGI
|
||||
example shows a reverse proxy configuration wrapping the :ref:`searxng-uWSGI
|
||||
application <uwsgi configuration>`, listening on ``http =
|
||||
127.0.0.1:8888``.
|
||||
|
||||
|
|
@ -251,7 +251,7 @@ Started wiki`_ is always a good resource *to keep in the pocket*.
|
|||
|
||||
Alternatively you can use the `uWSGI support from nginx`_ via unix
|
||||
sockets. For socket communication, you have to activate ``socket =
|
||||
/run/uwsgi/app/searx/socket`` and comment out the ``http =
|
||||
/run/uwsgi/app/searxng/socket`` and comment out the ``http =
|
||||
127.0.0.1:8888`` configuration in your :ref:`uwsgi ini file <uwsgi
|
||||
configuration>`.
|
||||
|
||||
|
|
@ -259,8 +259,8 @@ Started wiki`_ is always a good resource *to keep in the pocket*.
|
|||
port 80 (IPv4 and IPv6 http://[::]:80). The uWSGI app is configured at
|
||||
location ``/`` by importing the `uwsgi_params`_ and passing requests to
|
||||
the uWSGI socket (``uwsgi_pass``). The ``server``\'s root points to the
|
||||
:ref:`searx-src clone <searx-src>` and wraps directly the
|
||||
:origin:`searx/static/` content at ``location /static``.
|
||||
:ref:`searxng-src clone <searxng-src>` and wraps directly the
|
||||
:origin:`searxng/static/` content at ``location /static``.
|
||||
|
||||
.. code:: nginx
|
||||
|
||||
|
|
@ -273,73 +273,73 @@ Started wiki`_ is always a good resource *to keep in the pocket*.
|
|||
|
||||
location / {
|
||||
include uwsgi_params;
|
||||
uwsgi_pass unix:/run/uwsgi/app/searx/socket;
|
||||
uwsgi_pass unix:/run/uwsgi/app/searxng/socket;
|
||||
}
|
||||
|
||||
root /usr/local/searx/searx-src/searx;
|
||||
root /usr/local/searxng/searxng-src/searxng;
|
||||
location /static { }
|
||||
}
|
||||
|
||||
If not already exists, create a folder for the unix sockets, which can be
|
||||
used by the searx account:
|
||||
used by the searxng account:
|
||||
|
||||
.. code:: bash
|
||||
|
||||
mkdir -p /run/uwsgi/app/searx/
|
||||
sudo -H chown -R searx:searx /run/uwsgi/app/searx/
|
||||
mkdir -p /run/uwsgi/app/searxng/
|
||||
sudo -H chown -R searxng:searxng /run/uwsgi/app/searxng/
|
||||
|
||||
.. group-tab:: \.\. at subdir URL
|
||||
|
||||
Be warned, with these setups, your instance isn't :ref:`protected <searx
|
||||
Be warned, with these setups, your instance isn't :ref:`protected <searxng
|
||||
filtron>`. The examples are just here to demonstrate how to export the
|
||||
SearXNG application from a subdirectory URL ``https://example.org/searx/``.
|
||||
SearXNG application from a subdirectory URL ``https://example.org/searxng/``.
|
||||
|
||||
.. code:: nginx
|
||||
|
||||
# https://hostname.local/searx
|
||||
# https://hostname.local/searxng
|
||||
|
||||
location /searx {
|
||||
location /searxng {
|
||||
proxy_pass http://127.0.0.1:8888;
|
||||
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Connection $http_connection;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Scheme $scheme;
|
||||
proxy_set_header X-Script-Name /searx;
|
||||
proxy_set_header X-Script-Name /searxng;
|
||||
proxy_buffering off;
|
||||
}
|
||||
|
||||
location /searx/static/ {
|
||||
alias /usr/local/searx/searx-src/searx/static/;
|
||||
location /searxng/static/ {
|
||||
alias /usr/local/searxng/searxng-src/searxng/static/;
|
||||
}
|
||||
|
||||
The ``X-Script-Name /searx`` is needed by the SearXNG implementation to
|
||||
The ``X-Script-Name /searxng`` is needed by the SearXNG implementation to
|
||||
calculate relative URLs correct. The next example shows a uWSGI
|
||||
configuration. Since there are no HTTP headers in a (u)WSGI protocol, the
|
||||
value is shipped via the SCRIPT_NAME_ in the WSGI environment.
|
||||
|
||||
.. code:: nginx
|
||||
|
||||
# https://hostname.local/searx
|
||||
# https://hostname.local/searxng
|
||||
|
||||
location /searx {
|
||||
uwsgi_param SCRIPT_NAME /searx;
|
||||
location /searxng {
|
||||
uwsgi_param SCRIPT_NAME /searxng;
|
||||
include uwsgi_params;
|
||||
uwsgi_pass unix:/run/uwsgi/app/searx/socket;
|
||||
uwsgi_pass unix:/run/uwsgi/app/searxng/socket;
|
||||
}
|
||||
|
||||
location /searx/static/ {
|
||||
alias /usr/local/searx/searx-src/searx/;
|
||||
location /searxng/static/ {
|
||||
alias /usr/local/searxng/searxng-src/searxng/;
|
||||
}
|
||||
|
||||
For SearXNG to work correctly the ``base_url`` must be set in the
|
||||
:origin:`searx/settings.yml`.
|
||||
:origin:`searxng/settings.yml`.
|
||||
|
||||
.. code:: yaml
|
||||
|
||||
server:
|
||||
# replace example.org with your server's public name
|
||||
base_url : https://example.org/searx/
|
||||
base_url : https://example.org/searxng/
|
||||
|
||||
|
||||
Restart service:
|
||||
|
|
@ -351,21 +351,21 @@ Restart service:
|
|||
.. code:: sh
|
||||
|
||||
sudo -H systemctl restart nginx
|
||||
sudo -H service uwsgi restart searx
|
||||
sudo -H service uwsgi restart searxng
|
||||
|
||||
.. group-tab:: Arch Linux
|
||||
|
||||
.. code:: sh
|
||||
|
||||
sudo -H systemctl restart nginx
|
||||
sudo -H systemctl restart uwsgi@searx
|
||||
sudo -H systemctl restart uwsgi@searxng
|
||||
|
||||
.. group-tab:: Fedora
|
||||
|
||||
.. code:: sh
|
||||
|
||||
sudo -H systemctl restart nginx
|
||||
sudo -H touch /etc/uwsgi.d/searx.ini
|
||||
sudo -H touch /etc/uwsgi.d/searxng.ini
|
||||
|
||||
|
||||
Disable logs
|
||||
|
|
|
|||
|
|
@ -17,51 +17,51 @@ universe repository.
|
|||
Install packages
|
||||
================
|
||||
|
||||
.. kernel-include:: $DOCS_BUILD/includes/searx.rst
|
||||
.. kernel-include:: $DOCS_BUILD/includes/searxng.rst
|
||||
:start-after: START distro-packages
|
||||
:end-before: END distro-packages
|
||||
|
||||
.. hint::
|
||||
|
||||
This installs also the packages needed by :ref:`searx uwsgi`
|
||||
This installs also the packages needed by :ref:`searxng uwsgi`
|
||||
|
||||
.. _create searx user:
|
||||
.. _create searxng user:
|
||||
|
||||
Create user
|
||||
===========
|
||||
|
||||
.. kernel-include:: $DOCS_BUILD/includes/searx.rst
|
||||
.. kernel-include:: $DOCS_BUILD/includes/searxng.rst
|
||||
:start-after: START create user
|
||||
:end-before: END create user
|
||||
|
||||
.. _searx-src:
|
||||
.. _searxng-src:
|
||||
|
||||
Install SearXNG & dependencies
|
||||
==============================
|
||||
|
||||
Start a interactive shell from new created user and clone searx:
|
||||
Start a interactive shell from new created user and clone searxng:
|
||||
|
||||
.. kernel-include:: $DOCS_BUILD/includes/searx.rst
|
||||
:start-after: START clone searx
|
||||
:end-before: END clone searx
|
||||
.. kernel-include:: $DOCS_BUILD/includes/searxng.rst
|
||||
:start-after: START clone searxng
|
||||
:end-before: END clone searxng
|
||||
|
||||
In the same shell create *virtualenv*:
|
||||
|
||||
.. kernel-include:: $DOCS_BUILD/includes/searx.rst
|
||||
.. kernel-include:: $DOCS_BUILD/includes/searxng.rst
|
||||
:start-after: START create virtualenv
|
||||
:end-before: END create virtualenv
|
||||
|
||||
To install searx's dependencies, exit the SearXNG *bash* session you opened above
|
||||
To install searxng's dependencies, exit the SearXNG *bash* session you opened above
|
||||
and restart a new. Before install, first check if your *virtualenv* was sourced
|
||||
from the login (*~/.profile*):
|
||||
|
||||
.. kernel-include:: $DOCS_BUILD/includes/searx.rst
|
||||
.. kernel-include:: $DOCS_BUILD/includes/searxng.rst
|
||||
:start-after: START manage.sh update_packages
|
||||
:end-before: END manage.sh update_packages
|
||||
|
||||
.. tip::
|
||||
|
||||
Open a second terminal for the configuration tasks and leave the ``(searx)$``
|
||||
Open a second terminal for the configuration tasks and leave the ``(searxng)$``
|
||||
terminal open for the tasks below.
|
||||
|
||||
|
||||
|
|
@ -75,31 +75,31 @@ Configuration
|
|||
- :ref:`settings global`
|
||||
- :ref:`settings location`
|
||||
- :ref:`settings use_default_settings`
|
||||
- :origin:`/etc/searx/settings.yml <utils/templates/etc/searx/use_default_settings.yml>`
|
||||
- :origin:`/etc/searxng/settings.yml <utils/templates/etc/searxng/use_default_settings.yml>`
|
||||
|
||||
To create a initial ``/etc/searx/settings.yml`` you can start with a copy of the
|
||||
file :origin:`utils/templates/etc/searx/use_default_settings.yml`. This setup
|
||||
To create a initial ``/etc/searxng/settings.yml`` you can start with a copy of the
|
||||
file :origin:`utils/templates/etc/searxng/use_default_settings.yml`. This setup
|
||||
:ref:`use default settings <settings use_default_settings>` from
|
||||
:origin:`searx/settings.yml` and is recommended since :pull-searx:`2291` is merged.
|
||||
:origin:`searxng/settings.yml` and is recommended since :pull-searxng:`2291` is merged.
|
||||
|
||||
For a *minimal setup*, configure like shown below – replace ``searx@$(uname
|
||||
For a *minimal setup*, configure like shown below – replace ``searxng@$(uname
|
||||
-n)`` with a name of your choice, set ``ultrasecretkey`` -- *and/or* edit
|
||||
``/etc/searx/settings.yml`` to your needs.
|
||||
``/etc/searxng/settings.yml`` to your needs.
|
||||
|
||||
.. kernel-include:: $DOCS_BUILD/includes/searx.rst
|
||||
:start-after: START searx config
|
||||
:end-before: END searx config
|
||||
.. kernel-include:: $DOCS_BUILD/includes/searxng.rst
|
||||
:start-after: START searxng config
|
||||
:end-before: END searxng config
|
||||
|
||||
.. tabs::
|
||||
|
||||
.. group-tab:: Use default settings
|
||||
|
||||
.. literalinclude:: ../../utils/templates/etc/searx/settings.yml
|
||||
.. literalinclude:: ../../utils/templates/etc/searxng/settings.yml
|
||||
:language: yaml
|
||||
|
||||
.. group-tab:: searx/settings.yml
|
||||
.. group-tab:: searxng/settings.yml
|
||||
|
||||
.. literalinclude:: ../../searx/settings.yml
|
||||
.. literalinclude:: ../../searxng/settings.yml
|
||||
:language: yaml
|
||||
|
||||
|
||||
|
|
@ -107,12 +107,12 @@ Check
|
|||
=====
|
||||
|
||||
To check your SearXNG setup, optional enable debugging and start the *webapp*.
|
||||
SearXNG looks at the exported environment ``$SEARX_SETTINGS_PATH`` for a
|
||||
SearXNG looks at the exported environment ``$SEARXNG_SETTINGS_PATH`` for a
|
||||
configuration file.
|
||||
|
||||
.. kernel-include:: $DOCS_BUILD/includes/searx.rst
|
||||
:start-after: START check searx installation
|
||||
:end-before: END check searx installation
|
||||
.. kernel-include:: $DOCS_BUILD/includes/searxng.rst
|
||||
:start-after: START check searxng installation
|
||||
:end-before: END check searxng installation
|
||||
|
||||
If everything works fine, hit ``[CTRL-C]`` to stop the *webapp* and disable the
|
||||
debug option in ``settings.yml``. You can now exit SearXNG user bash (enter exit
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
.. _searx uwsgi:
|
||||
.. _searxng uwsgi:
|
||||
|
||||
=====
|
||||
uwsgi
|
||||
|
|
@ -35,17 +35,17 @@ recommend two methods
|
|||
`systemd.unit`_ template files as described here `One service per app in systemd`_.
|
||||
|
||||
There is one `systemd unit template`_ and one `uwsgi ini file`_ per uWSGI-app
|
||||
placed at dedicated locations. Take archlinux and a searx.ini as example::
|
||||
placed at dedicated locations. Take archlinux and a searxng.ini as example::
|
||||
|
||||
unit template --> /usr/lib/systemd/system/uwsgi@.service
|
||||
uwsgi ini files --> /etc/uwsgi/searx.ini
|
||||
uwsgi ini files --> /etc/uwsgi/searxng.ini
|
||||
|
||||
The SearXNG app can be maintained as know from common systemd units::
|
||||
|
||||
systemctl enable uwsgi@searx
|
||||
systemctl start uwsgi@searx
|
||||
systemctl restart uwsgi@searx
|
||||
systemctl stop uwsgi@searx
|
||||
systemctl enable uwsgi@searxng
|
||||
systemctl start uwsgi@searxng
|
||||
systemctl restart uwsgi@searxng
|
||||
systemctl stop uwsgi@searxng
|
||||
|
||||
The `uWSGI Emperor`_ mode which fits for maintaining a large range of uwsgi apps.
|
||||
|
||||
|
|
@ -54,12 +54,12 @@ The `uWSGI Emperor`_ mode which fits for maintaining a large range of uwsgi apps
|
|||
systemd unit. The Emperor service will scan specific directories for `uwsgi
|
||||
ini file`_\s (also know as *vassals*). If a *vassal* is added, removed or the
|
||||
timestamp is modified, a corresponding action takes place: a new uWSGI
|
||||
instance is started, reload or stopped. Take Fedora and a searx.ini as
|
||||
instance is started, reload or stopped. Take Fedora and a searxng.ini as
|
||||
example::
|
||||
|
||||
to start a new SearXNG instance create --> /etc/uwsgi.d/searx.ini
|
||||
to reload the instance edit timestamp --> touch /etc/uwsgi.d/searx.ini
|
||||
to stop instance remove ini --> rm /etc/uwsgi.d/searx.ini
|
||||
to start a new SearXNG instance create --> /etc/uwsgi.d/searxng.ini
|
||||
to reload the instance edit timestamp --> touch /etc/uwsgi.d/searxng.ini
|
||||
to stop instance remove ini --> rm /etc/uwsgi.d/searxng.ini
|
||||
|
||||
Distributors
|
||||
============
|
||||
|
|
@ -80,15 +80,15 @@ do similar for the uWSGI infrastructure (with less comfort), the folders are::
|
|||
|
||||
The `uwsgi ini file`_ is enabled by a symbolic link::
|
||||
|
||||
ln -s /etc/uwsgi/apps-available/searx.ini /etc/uwsgi/apps-enabled/
|
||||
ln -s /etc/uwsgi/apps-available/searxng.ini /etc/uwsgi/apps-enabled/
|
||||
|
||||
From debian's documentation (``/usr/share/doc/uwsgi/README.Debian.gz``): You
|
||||
could control specific instance(s) by issuing::
|
||||
|
||||
service uwsgi <command> <confname> <confname> ...
|
||||
|
||||
sudo -H service uwsgi start searx
|
||||
sudo -H service uwsgi stop searx
|
||||
sudo -H service uwsgi start searxng
|
||||
sudo -H service uwsgi stop searxng
|
||||
|
||||
My experience is, that this command is a bit buggy.
|
||||
|
||||
|
|
@ -104,47 +104,47 @@ restart the uwsgi application.
|
|||
|
||||
.. group-tab:: Ubuntu / debian
|
||||
|
||||
.. kernel-include:: $DOCS_BUILD/includes/searx.rst
|
||||
:start-after: START searx uwsgi-description ubuntu-20.04
|
||||
:end-before: END searx uwsgi-description ubuntu-20.04
|
||||
.. kernel-include:: $DOCS_BUILD/includes/searxng.rst
|
||||
:start-after: START searxng uwsgi-description ubuntu-20.04
|
||||
:end-before: END searxng uwsgi-description ubuntu-20.04
|
||||
|
||||
.. hotfix: a bug group-tab need this comment
|
||||
|
||||
.. group-tab:: Arch Linux
|
||||
|
||||
.. kernel-include:: $DOCS_BUILD/includes/searx.rst
|
||||
:start-after: START searx uwsgi-description arch
|
||||
:end-before: END searx uwsgi-description arch
|
||||
.. kernel-include:: $DOCS_BUILD/includes/searxng.rst
|
||||
:start-after: START searxng uwsgi-description arch
|
||||
:end-before: END searxng uwsgi-description arch
|
||||
|
||||
.. hotfix: a bug group-tab need this comment
|
||||
|
||||
.. group-tab:: Fedora / RHEL
|
||||
|
||||
.. kernel-include:: $DOCS_BUILD/includes/searx.rst
|
||||
:start-after: START searx uwsgi-description fedora
|
||||
:end-before: END searx uwsgi-description fedora
|
||||
.. kernel-include:: $DOCS_BUILD/includes/searxng.rst
|
||||
:start-after: START searxng uwsgi-description fedora
|
||||
:end-before: END searxng uwsgi-description fedora
|
||||
|
||||
|
||||
.. tabs::
|
||||
|
||||
.. group-tab:: Ubuntu / debian
|
||||
|
||||
.. kernel-include:: $DOCS_BUILD/includes/searx.rst
|
||||
:start-after: START searx uwsgi-appini ubuntu-20.04
|
||||
:end-before: END searx uwsgi-appini ubuntu-20.04
|
||||
.. kernel-include:: $DOCS_BUILD/includes/searxng.rst
|
||||
:start-after: START searxng uwsgi-appini ubuntu-20.04
|
||||
:end-before: END searxng uwsgi-appini ubuntu-20.04
|
||||
|
||||
.. hotfix: a bug group-tab need this comment
|
||||
|
||||
.. group-tab:: Arch Linux
|
||||
|
||||
.. kernel-include:: $DOCS_BUILD/includes/searx.rst
|
||||
:start-after: START searx uwsgi-appini arch
|
||||
:end-before: END searx uwsgi-appini arch
|
||||
.. kernel-include:: $DOCS_BUILD/includes/searxng.rst
|
||||
:start-after: START searxng uwsgi-appini arch
|
||||
:end-before: END searxng uwsgi-appini arch
|
||||
|
||||
.. hotfix: a bug group-tab need this comment
|
||||
|
||||
.. group-tab:: Fedora / RHEL
|
||||
|
||||
.. kernel-include:: $DOCS_BUILD/includes/searx.rst
|
||||
:start-after: START searx uwsgi-appini fedora
|
||||
:end-before: END searx uwsgi-appini fedora
|
||||
.. kernel-include:: $DOCS_BUILD/includes/searxng.rst
|
||||
:start-after: START searxng uwsgi-appini fedora
|
||||
:end-before: END searxng uwsgi-appini fedora
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ Installation scripts
|
|||
|
||||
.. sidebar:: Update OS first!
|
||||
|
||||
To avoid unwanted side effects, update your OS before installing searx.
|
||||
To avoid unwanted side effects, update your OS before installing searxng.
|
||||
|
||||
The following will install a setup as shown in :ref:`architecture`. First you
|
||||
need to get a clone. The clone is only needed for the installation procedure
|
||||
|
|
@ -35,29 +35,29 @@ and some maintenance tasks (alternatively you can create your own fork).
|
|||
|
||||
For the installation procedure, use a *sudoer* login to run the scripts. If you
|
||||
install from ``root``, take into account that the scripts are creating a
|
||||
``searx``, a ``filtron`` and a ``morty`` user. In the installation procedure
|
||||
these new created users do need read access to the clone of searx, which is not
|
||||
``searxng``, a ``filtron`` and a ``morty`` user. In the installation procedure
|
||||
these new created users do need read access to the clone of searxng, which is not
|
||||
the case if you clone into a folder below ``/root``.
|
||||
|
||||
.. code:: bash
|
||||
|
||||
$ cd ~/Downloads
|
||||
$ git clone https://github.com/searxng/searxng.git searx
|
||||
$ cd searx
|
||||
$ git clone https://github.com/searxng/searxng.git searxng
|
||||
$ cd searxng
|
||||
|
||||
.. sidebar:: further read
|
||||
|
||||
- :ref:`toolboxing`
|
||||
- :ref:`update searx`
|
||||
- :ref:`inspect searx`
|
||||
- :ref:`update searxng`
|
||||
- :ref:`inspect searxng`
|
||||
|
||||
**Install** :ref:`SearXNG service <searx.sh>`
|
||||
**Install** :ref:`SearXNG service <searxng.sh>`
|
||||
|
||||
This installs SearXNG as described in :ref:`installation basic`.
|
||||
|
||||
.. code:: bash
|
||||
|
||||
$ sudo -H ./utils/searx.sh install all
|
||||
$ sudo -H ./utils/searxng.sh install all
|
||||
|
||||
**Install** :ref:`filtron reverse proxy <filtron.sh>`
|
||||
|
||||
|
|
@ -86,12 +86,12 @@ install the SearXNG plugins from **The Green Web Foundation** `[ref]
|
|||
|
||||
.. code:: bash
|
||||
|
||||
$ sudo -H ./utils/searx.sh shell
|
||||
$ sudo -H ./utils/searxng.sh shell
|
||||
// exit with [CTRL-D]
|
||||
(searx-pyenv) searx@ryzen:~$ pip install git+https://github.com/return42/tgwf-searx-plugins
|
||||
(searxng-pyenv) searxng@ryzen:~$ pip install git+https://github.com/return42/tgwf-searx-plugins
|
||||
|
||||
In the :ref:`settings.yml` activate the ``plugins:`` section and add module
|
||||
``only_show_green_results`` from tgwf-searx-plugins.
|
||||
``only_show_green_results`` from tgwf-searxng-plugins.
|
||||
|
||||
.. code:: yaml
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
.. _searx morty:
|
||||
.. _searxng morty:
|
||||
|
||||
=========================
|
||||
How to setup result proxy
|
||||
|
|
@ -15,9 +15,9 @@ How to setup result proxy
|
|||
By default SearXNG can only act as an image proxy for result images, but it is
|
||||
possible to proxify all the result URLs with an external service, morty_.
|
||||
|
||||
To use this feature, morty has to be installed and activated in searx's
|
||||
To use this feature, morty has to be installed and activated in searxng's
|
||||
``settings.yml``. Add the following snippet to your ``settings.yml`` and
|
||||
restart searx:
|
||||
restart searxng:
|
||||
|
||||
.. code:: yaml
|
||||
|
||||
|
|
@ -30,8 +30,8 @@ instances without a HTTP proxy. If your morty service is public, the url is the
|
|||
address of the reverse proxy (e.g ``https://example.org/morty``).
|
||||
|
||||
For more information about *result proxy* have a look at *"SearXNG via filtron
|
||||
plus morty"* in the :ref:`nginx <nginx searx via filtron plus morty>` and
|
||||
:ref:`apache <apache searx via filtron plus morty>` sections.
|
||||
plus morty"* in the :ref:`nginx <nginx searxng via filtron plus morty>` and
|
||||
:ref:`apache <apache searxng via filtron plus morty>` sections.
|
||||
|
||||
``url``
|
||||
Is the address of the running morty service.
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ Configuration defaults (at built time):
|
|||
|
||||
.. _configured plugins:
|
||||
|
||||
.. jinja:: searx
|
||||
.. jinja:: searxng
|
||||
|
||||
.. flat-table:: Plugins configured at built time (defaults)
|
||||
:header-rows: 1
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
.. _update searx:
|
||||
.. _update searxng:
|
||||
|
||||
=============
|
||||
How to update
|
||||
|
|
@ -7,11 +7,11 @@ How to update
|
|||
How to update depends on the :ref:`installation` method. If you have used the
|
||||
:ref:`installation scripts`, use ``update`` command from the scripts.
|
||||
|
||||
**Update** :ref:`SearXNG service <searx.sh>`
|
||||
**Update** :ref:`SearXNG service <searxng.sh>`
|
||||
|
||||
.. code:: sh
|
||||
|
||||
sudo -H ./utils/searx.sh update searx
|
||||
sudo -H ./utils/searxng.sh update searxng
|
||||
|
||||
**Update** :ref:`filtron reverse proxy <filtron.sh>`
|
||||
|
||||
|
|
@ -25,7 +25,7 @@ How to update depends on the :ref:`installation` method. If you have used the
|
|||
|
||||
$ sudo -H ./utils/morty.sh update morty
|
||||
|
||||
.. _inspect searx:
|
||||
.. _inspect searxng:
|
||||
|
||||
======================
|
||||
How to inspect & debug
|
||||
|
|
@ -39,11 +39,11 @@ How to inspect & debug
|
|||
How to debug depends on the :ref:`installation` method. If you have used the
|
||||
:ref:`installation scripts`, use ``inspect`` command from the scripts.
|
||||
|
||||
**Inspect** :ref:`SearXNG service <searx.sh>`
|
||||
**Inspect** :ref:`SearXNG service <searxng.sh>`
|
||||
|
||||
.. code:: sh
|
||||
|
||||
sudo -H ./utils/searx.sh inspect service
|
||||
sudo -H ./utils/searxng.sh inspect service
|
||||
|
||||
**Inspect** :ref:`filtron reverse proxy <filtron.sh>`
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
.. template evaluated by: ./utils/searx.sh docs
|
||||
.. template evaluated by: ./utils/searxng.sh docs
|
||||
.. hint: all dollar-names are variables, dollar sign itself is quoted by: \\$
|
||||
|
||||
.. START distro-packages
|
||||
|
|
@ -72,7 +72,7 @@ ${fedora_build}
|
|||
|
||||
.. END create user
|
||||
|
||||
.. START clone searx
|
||||
.. START clone searxng
|
||||
|
||||
.. tabs::
|
||||
|
||||
|
|
@ -81,9 +81,9 @@ ${fedora_build}
|
|||
.. code-block:: sh
|
||||
|
||||
$ sudo -H -u ${SERVICE_USER} -i
|
||||
(${SERVICE_USER})$ git clone \"$GIT_URL\" \"$SEARX_SRC\"
|
||||
(${SERVICE_USER})$ git clone \"$GIT_URL\" \"$SEARXNG_SRC\"
|
||||
|
||||
.. END clone searx
|
||||
.. END clone searxng
|
||||
|
||||
.. START create virtualenv
|
||||
|
||||
|
|
@ -93,8 +93,8 @@ ${fedora_build}
|
|||
|
||||
.. code-block:: sh
|
||||
|
||||
(${SERVICE_USER})$ python3 -m venv \"${SEARX_PYENV}\"
|
||||
(${SERVICE_USER})$ echo \". ${SEARX_PYENV}/bin/activate\" >> \"$SERVICE_HOME/.profile\"
|
||||
(${SERVICE_USER})$ python3 -m venv \"${SEARXNG_PYENV}\"
|
||||
(${SERVICE_USER})$ echo \". ${SEARXNG_PYENV}/bin/activate\" >> \"$SERVICE_HOME/.profile\"
|
||||
|
||||
.. END create virtualenv
|
||||
|
||||
|
|
@ -109,7 +109,7 @@ ${fedora_build}
|
|||
$ sudo -H -u ${SERVICE_USER} -i
|
||||
|
||||
(${SERVICE_USER})$ command -v python && python --version
|
||||
$SEARX_PYENV/bin/python
|
||||
$SEARXNG_PYENV/bin/python
|
||||
Python 3.8.1
|
||||
|
||||
# update pip's boilerplate ..
|
||||
|
|
@ -118,14 +118,14 @@ ${fedora_build}
|
|||
pip install -U wheel
|
||||
pip install -U pyyaml
|
||||
|
||||
# jump to searx's working tree and install SearXNG into virtualenv
|
||||
(${SERVICE_USER})$ cd \"$SEARX_SRC\"
|
||||
# jump to searxng's working tree and install SearXNG into virtualenv
|
||||
(${SERVICE_USER})$ cd \"$SEARXNG_SRC\"
|
||||
(${SERVICE_USER})$ pip install -e .
|
||||
|
||||
|
||||
.. END manage.sh update_packages
|
||||
|
||||
.. START searx config
|
||||
.. START searxng config
|
||||
|
||||
.. tabs::
|
||||
|
||||
|
|
@ -133,17 +133,17 @@ ${fedora_build}
|
|||
|
||||
.. code-block:: sh
|
||||
|
||||
$ sudo -H mkdir -p \"$(dirname ${SEARX_SETTINGS_PATH})\"
|
||||
$ sudo -H cp \"$SEARX_SRC/utils/templates/etc/searx/settings.yml\" \\
|
||||
\"${SEARX_SETTINGS_PATH}\"
|
||||
$ sudo -H mkdir -p \"$(dirname ${SEARXNG_SETTINGS_PATH})\"
|
||||
$ sudo -H cp \"$SEARXNG_SRC/utils/templates/etc/searxng/settings.yml\" \\
|
||||
\"${SEARXNG_SETTINGS_PATH}\"
|
||||
|
||||
.. group-tab:: searx/settings.yml
|
||||
.. group-tab:: searxng/settings.yml
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
$ sudo -H mkdir -p \"$(dirname ${SEARX_SETTINGS_PATH})\"
|
||||
$ sudo -H cp \"$SEARX_SRC/searx/settings.yml\" \\
|
||||
\"${SEARX_SETTINGS_PATH}\"
|
||||
$ sudo -H mkdir -p \"$(dirname ${SEARXNG_SETTINGS_PATH})\"
|
||||
$ sudo -H cp \"$SEARXNG_SRC/searxng/settings.yml\" \\
|
||||
\"${SEARXNG_SETTINGS_PATH}\"
|
||||
|
||||
.. tabs::
|
||||
|
||||
|
|
@ -151,11 +151,11 @@ ${fedora_build}
|
|||
|
||||
.. code-block:: sh
|
||||
|
||||
$ sudo -H sed -i -e \"s/ultrasecretkey/\$(openssl rand -hex 16)/g\" \"$SEARX_SETTINGS_PATH\"
|
||||
$ sudo -H sed -i -e \"s/ultrasecretkey/\$(openssl rand -hex 16)/g\" \"$SEARXNG_SETTINGS_PATH\"
|
||||
|
||||
.. END searx config
|
||||
.. END searxng config
|
||||
|
||||
.. START check searx installation
|
||||
.. START check searxng installation
|
||||
|
||||
.. tabs::
|
||||
|
||||
|
|
@ -164,18 +164,18 @@ ${fedora_build}
|
|||
.. code-block:: sh
|
||||
|
||||
# enable debug ..
|
||||
$ sudo -H sed -i -e \"s/debug : False/debug : True/g\" \"$SEARX_SETTINGS_PATH\"
|
||||
$ sudo -H sed -i -e \"s/debug : False/debug : True/g\" \"$SEARXNG_SETTINGS_PATH\"
|
||||
|
||||
# start webapp
|
||||
$ sudo -H -u ${SERVICE_USER} -i
|
||||
(${SERVICE_USER})$ cd ${SEARX_SRC}
|
||||
(${SERVICE_USER})$ export SEARX_SETTINGS_PATH=\"${SEARX_SETTINGS_PATH}\"
|
||||
(${SERVICE_USER})$ python searx/webapp.py
|
||||
(${SERVICE_USER})$ cd ${SEARXNG_SRC}
|
||||
(${SERVICE_USER})$ export SEARXNG_SETTINGS_PATH=\"${SEARXNG_SETTINGS_PATH}\"
|
||||
(${SERVICE_USER})$ python searxng/webapp.py
|
||||
|
||||
# disable debug
|
||||
$ sudo -H sed -i -e \"s/debug : True/debug : False/g\" \"$SEARX_SETTINGS_PATH\"
|
||||
$ sudo -H sed -i -e \"s/debug : True/debug : False/g\" \"$SEARXNG_SETTINGS_PATH\"
|
||||
|
||||
Open WEB browser and visit http://$SEARX_INTERNAL_HTTP . If you are inside a
|
||||
Open WEB browser and visit http://$SEARXNG_INTERNAL_HTTP . If you are inside a
|
||||
container or in a script, test with curl:
|
||||
|
||||
.. tabs::
|
||||
|
|
@ -184,13 +184,13 @@ container or in a script, test with curl:
|
|||
|
||||
.. code-block:: sh
|
||||
|
||||
$ xdg-open http://$SEARX_INTERNAL_HTTP
|
||||
$ xdg-open http://$SEARXNG_INTERNAL_HTTP
|
||||
|
||||
.. group-tab:: curl
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
$ curl --location --verbose --head --insecure $SEARX_INTERNAL_HTTP
|
||||
$ curl --location --verbose --head --insecure $SEARXNG_INTERNAL_HTTP
|
||||
|
||||
* Trying 127.0.0.1:8888...
|
||||
* TCP_NODELAY set
|
||||
|
|
@ -206,4 +206,4 @@ container or in a script, test with curl:
|
|||
HTTP/1.0 200 OK
|
||||
...
|
||||
|
||||
.. END check searx installation
|
||||
.. END check searxng installation
|
||||
26
docs/conf.py
26
docs/conf.py
|
|
@ -4,8 +4,8 @@
|
|||
import sys, os
|
||||
from pallets_sphinx_themes import ProjectLink
|
||||
|
||||
from searx import get_setting
|
||||
from searx.version import VERSION_STRING, GIT_URL, GIT_BRANCH
|
||||
from searxng import get_setting
|
||||
from searxng.version import VERSION_STRING, GIT_URL, GIT_BRANCH
|
||||
|
||||
# Project --------------------------------------------------------------
|
||||
|
||||
|
|
@ -14,7 +14,7 @@ copyright = '2021 SearXNG team, 2015-2021 Adam Tauber, Noémi Ványi'
|
|||
author = '2021 SearXNG team, 2015-2021 Adam Tauber'
|
||||
release, version = VERSION_STRING, VERSION_STRING
|
||||
|
||||
SEARX_URL = get_setting('server.base_url') or 'https://example.org/searxng'
|
||||
SEARXNG_URL = get_setting('server.base_url') or 'https://example.org/searxng'
|
||||
ISSUE_URL = get_setting('brand.issue_url')
|
||||
DOCS_URL = get_setting('brand.docs_url')
|
||||
PUBLIC_INSTANCES = get_setting('brand.public_instances')
|
||||
|
|
@ -37,13 +37,13 @@ numfig = True
|
|||
|
||||
exclude_patterns = ['build-templates/*.rst']
|
||||
|
||||
import searx.engines
|
||||
import searx.plugins
|
||||
searx.engines.load_engines(searx.settings['engines'])
|
||||
import searxng.engines
|
||||
import searxng.plugins
|
||||
searxng.engines.load_engines(searxng.settings['engines'])
|
||||
jinja_contexts = {
|
||||
'searx': {
|
||||
'engines': searx.engines.engines,
|
||||
'plugins': searx.plugins.plugins
|
||||
'searxng': {
|
||||
'engines': searxng.engines.engines,
|
||||
'plugins': searxng.plugins.plugins
|
||||
},
|
||||
}
|
||||
|
||||
|
|
@ -53,12 +53,12 @@ extlinks = {}
|
|||
# upstream links
|
||||
extlinks['wiki'] = ('https://github.com/searxng/searxng/wiki/%s', ' ')
|
||||
extlinks['pull'] = ('https://github.com/searxng/searxng/pull/%s', 'PR ')
|
||||
extlinks['pull-searx'] = ('https://github.com/searx/searx/pull/%s', 'PR ')
|
||||
extlinks['pull-searxng'] = ('https://github.com/searxng/searxng/pull/%s', 'PR ')
|
||||
|
||||
# links to custom brand
|
||||
extlinks['origin'] = (GIT_URL + '/blob/' + GIT_BRANCH + '/%s', 'git://')
|
||||
extlinks['patch'] = (GIT_URL + '/commit/%s', '#')
|
||||
extlinks['search'] = (SEARX_URL + '/%s', '#')
|
||||
extlinks['search'] = (SEARXNG_URL + '/%s', '#')
|
||||
extlinks['docs'] = (DOCS_URL + '/%s', 'docs: ')
|
||||
extlinks['pypi'] = ('https://pypi.org/project/%s', 'PyPi: ')
|
||||
extlinks['man'] = ('https://manpages.debian.org/jump?q=%s', '')
|
||||
|
|
@ -105,7 +105,7 @@ issues_github_path = "searxng/searxng"
|
|||
sys.path.append(os.path.abspath('_themes'))
|
||||
sys.path.insert(0, os.path.abspath("../utils/"))
|
||||
html_theme_path = ['_themes']
|
||||
html_theme = "searx"
|
||||
html_theme = "searxng"
|
||||
|
||||
# sphinx.ext.imgmath setup
|
||||
html_math_renderer = 'imgmath'
|
||||
|
|
@ -138,5 +138,5 @@ html_show_sourcelink = False
|
|||
# LaTeX ----------------------------------------------------------------
|
||||
|
||||
latex_documents = [
|
||||
(master_doc, "searx-{}.tex".format(VERSION_STRING), html_title, author, "manual")
|
||||
(master_doc, "searxng-{}.tex".format(VERSION_STRING), html_title, author, "manual")
|
||||
]
|
||||
|
|
|
|||
|
|
@ -33,14 +33,14 @@ capabilities.
|
|||
A few widely used features work differently or turned off by default or not
|
||||
implemented at all **as a consequence of privacy-by-design**.
|
||||
|
||||
If a feature reduces the privacy preserving aspects of searx, it should be
|
||||
If a feature reduces the privacy preserving aspects of searxng, it should be
|
||||
switched off by default or should not implemented at all. There are plenty of
|
||||
search engines already providing such features. If a feature reduces the
|
||||
protection of searx, users must be informed about the effect of choosing to
|
||||
protection of searxng, users must be informed about the effect of choosing to
|
||||
enable it. Features that protect privacy but differ from the expectations of
|
||||
the user should also be explained.
|
||||
|
||||
Also, if you think that something works weird with searx, it's might be because
|
||||
Also, if you think that something works weird with searxng, it's might be because
|
||||
of the tool you use is designed in a way to interfere with the privacy respect.
|
||||
Submitting a bugreport to the vendor of the tool that misbehaves might be a good
|
||||
feedback to reconsider the disrespect to its customers (e.g. ``GET`` vs ``POST``
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ better results.
|
|||
|
||||
Because there is no general search API which could be used for every search
|
||||
engine, an adapter has to be built between SearXNG and the external search
|
||||
engines. Adapters are stored under the folder :origin:`searx/engines`.
|
||||
engines. Adapters are stored under the folder :origin:`searxng/engines`.
|
||||
|
||||
.. _general engine configuration:
|
||||
|
||||
|
|
@ -70,7 +70,7 @@ For a more detailed description, see :ref:`settings engine` in the :ref:`settin
|
|||
argument type information
|
||||
======================= =========== ===============================================
|
||||
name string name of search-engine
|
||||
engine string name of searx-engine (filename without ``.py``)
|
||||
engine string name of searxng-engine (filename without ``.py``)
|
||||
enable_http bool enable HTTP (by default only HTTPS is enabled).
|
||||
shortcut string shortcut of search-engine
|
||||
timeout string specific timeout for search-engine
|
||||
|
|
@ -184,7 +184,7 @@ Specify Request
|
|||
---------------
|
||||
|
||||
The function :py:func:`def request(query, params):
|
||||
<searx.engines.demo_online.request>` always returns the ``params`` variable, the
|
||||
<searxng.engines.demo_online.request>` always returns the ``params`` variable, the
|
||||
following parameters can be used to specify a search request:
|
||||
|
||||
.. table::
|
||||
|
|
|
|||
|
|
@ -42,10 +42,10 @@ be set on a *production* system.
|
|||
prerequisites from various projects on developer's desktop is always a good
|
||||
choice.**
|
||||
|
||||
The scripts from :ref:`searx_utils` can divide in those to install and maintain
|
||||
The scripts from :ref:`searxng_utils` can divide in those to install and maintain
|
||||
software:
|
||||
|
||||
- :ref:`searx.sh`
|
||||
- :ref:`searxng.sh`
|
||||
- :ref:`filtron.sh`
|
||||
- :ref:`morty.sh`
|
||||
|
||||
|
|
@ -88,13 +88,13 @@ fork:
|
|||
.. code:: sh
|
||||
|
||||
$ cd ~/Downloads
|
||||
$ git clone https://github.com/searxng/searxng.git searx
|
||||
$ cd searx
|
||||
$ git clone https://github.com/searxng/searxng.git searxng
|
||||
$ cd searxng
|
||||
|
||||
The :ref:`lxc-searx.env` consists of several images, see ``export
|
||||
LXC_SUITE=(...`` near by :origin:`utils/lxc-searx.env#L19`. For this blog post
|
||||
The :ref:`lxc-searxng.env` consists of several images, see ``export
|
||||
LXC_SUITE=(...`` near by :origin:`utils/lxc-searxng.env#L19`. For this blog post
|
||||
we exercise on a archlinux_ image. The container of this image is named
|
||||
``searx-archlinux``. Lets build the container, but be sure that this container
|
||||
``searxng-archlinux``. Lets build the container, but be sure that this container
|
||||
does not already exists, so first lets remove possible old one:
|
||||
|
||||
.. tabs::
|
||||
|
|
@ -103,14 +103,14 @@ does not already exists, so first lets remove possible old one:
|
|||
|
||||
.. code:: sh
|
||||
|
||||
$ sudo -H ./utils/lxc.sh remove searx-archlinux
|
||||
$ sudo -H ./utils/lxc.sh build searx-archlinux
|
||||
$ sudo -H ./utils/lxc.sh remove searxng-archlinux
|
||||
$ sudo -H ./utils/lxc.sh build searxng-archlinux
|
||||
|
||||
.. sidebar:: The ``searx-archlinux`` container
|
||||
.. sidebar:: The ``searxng-archlinux`` container
|
||||
|
||||
is the base of all our exercises here.
|
||||
|
||||
In this container we install all services :ref:`including searx, morty & filtron
|
||||
In this container we install all services :ref:`including searxng, morty & filtron
|
||||
<lxc.sh install suite>` in once:
|
||||
|
||||
.. tabs::
|
||||
|
|
@ -119,7 +119,7 @@ In this container we install all services :ref:`including searx, morty & filtron
|
|||
|
||||
.. code:: sh
|
||||
|
||||
$ sudo -H ./utils/lxc.sh install suite searx-archlinux
|
||||
$ sudo -H ./utils/lxc.sh install suite searxng-archlinux
|
||||
|
||||
To proxy HTTP from filtron and morty in the container to the outside of the
|
||||
container, install nginx into the container. Once for the bot blocker filtron:
|
||||
|
|
@ -130,10 +130,10 @@ container, install nginx into the container. Once for the bot blocker filtron:
|
|||
|
||||
.. code:: sh
|
||||
|
||||
$ sudo -H ./utils/lxc.sh cmd searx-archlinux \
|
||||
$ sudo -H ./utils/lxc.sh cmd searxng-archlinux \
|
||||
./utils/filtron.sh nginx install
|
||||
...
|
||||
INFO: got 429 from http://10.174.184.156/searx
|
||||
INFO: got 429 from http://10.174.184.156/searxng
|
||||
|
||||
and once for the content sanitizer (content proxy morty):
|
||||
|
||||
|
|
@ -143,7 +143,7 @@ and once for the content sanitizer (content proxy morty):
|
|||
|
||||
.. code:: sh
|
||||
|
||||
$ sudo -H ./utils/lxc.sh cmd searx-archlinux \
|
||||
$ sudo -H ./utils/lxc.sh cmd searxng-archlinux \
|
||||
./utils/morty.sh nginx install
|
||||
...
|
||||
INFO: got 200 from http://10.174.184.156/morty/
|
||||
|
|
@ -154,8 +154,8 @@ and once for the content sanitizer (content proxy morty):
|
|||
blocker (filtron) and WEB content sanitizer (content proxy morty), both are
|
||||
needed for a *privacy protecting* search engine.
|
||||
|
||||
On your system, the IP of your ``searx-archlinux`` container differs from
|
||||
http://10.174.184.156/searx, just open the URL reported in your installation
|
||||
On your system, the IP of your ``searxng-archlinux`` container differs from
|
||||
http://10.174.184.156/searxng, just open the URL reported in your installation
|
||||
protocol in your WEB browser from the desktop to test the instance from outside
|
||||
of the container.
|
||||
|
||||
|
|
@ -169,7 +169,7 @@ In containers, work as usual
|
|||
|
||||
Usually you open a root-bash using ``sudo -H bash``. In case of LXC containers
|
||||
open the root-bash in the container using ``./utils/lxc.sh cmd
|
||||
searx-archlinux``:
|
||||
searxng-archlinux``:
|
||||
|
||||
.. tabs::
|
||||
|
||||
|
|
@ -177,26 +177,26 @@ searx-archlinux``:
|
|||
|
||||
.. code:: sh
|
||||
|
||||
$ sudo -H ./utils/lxc.sh cmd searx-archlinux bash
|
||||
INFO: [searx-archlinux] bash
|
||||
[root@searx-archlinux searx]# pwd
|
||||
/share/searx
|
||||
$ sudo -H ./utils/lxc.sh cmd searxng-archlinux bash
|
||||
INFO: [searxng-archlinux] bash
|
||||
[root@searxng-archlinux searxng]# pwd
|
||||
/share/searxng
|
||||
|
||||
The prompt ``[root@searx-archlinux ...]`` signals, that you are the root user in
|
||||
the searx-container. To debug the running SearXNG instance use:
|
||||
The prompt ``[root@searxng-archlinux ...]`` signals, that you are the root user in
|
||||
the searxng-container. To debug the running SearXNG instance use:
|
||||
|
||||
.. tabs::
|
||||
|
||||
.. group-tab:: root@searx-archlinux
|
||||
.. group-tab:: root@searxng-archlinux
|
||||
|
||||
.. code:: sh
|
||||
|
||||
$ ./utils/searx.sh inspect service
|
||||
$ ./utils/searxng.sh inspect service
|
||||
...
|
||||
use [CTRL-C] to stop monitoring the log
|
||||
...
|
||||
|
||||
Back in the browser on your desktop open the service http://10.174.184.156/searx
|
||||
Back in the browser on your desktop open the service http://10.174.184.156/searxng
|
||||
and run your application tests while the debug log is shown in the terminal from
|
||||
above. You can stop monitoring using ``CTRL-C``, this also disables the *"debug
|
||||
option"* in SearXNG's settings file and restarts the SearXNG uwsgi application.
|
||||
|
|
@ -204,29 +204,29 @@ To debug services from filtron and morty analogous use:
|
|||
|
||||
.. tabs::
|
||||
|
||||
.. group-tab:: root@searx-archlinux
|
||||
.. group-tab:: root@searxng-archlinux
|
||||
|
||||
.. code:: sh
|
||||
|
||||
$ ./utils/filtron.sh inspect service
|
||||
$ ./utils/morty.sh inspect service
|
||||
|
||||
Another point we have to notice is that each service (:ref:`SearXNG <searx.sh>`,
|
||||
Another point we have to notice is that each service (:ref:`SearXNG <searxng.sh>`,
|
||||
:ref:`filtron <filtron.sh>` and :ref:`morty <morty.sh>`) runs under dedicated
|
||||
system user account with the same name (compare :ref:`create searx user`). To
|
||||
system user account with the same name (compare :ref:`create searxng user`). To
|
||||
get a shell from theses accounts, simply call one of the scripts:
|
||||
|
||||
.. tabs::
|
||||
|
||||
.. group-tab:: root@searx-archlinux
|
||||
.. group-tab:: root@searxng-archlinux
|
||||
|
||||
.. code:: sh
|
||||
|
||||
$ ./utils/searx.sh shell
|
||||
$ ./utils/searxng.sh shell
|
||||
$ ./utils/filtron.sh shell
|
||||
$ ./utils/morty.sh shell
|
||||
|
||||
To get in touch, open a shell from the service user (searx@searx-archlinux):
|
||||
To get in touch, open a shell from the service user (searxng@searxng-archlinux):
|
||||
|
||||
.. tabs::
|
||||
|
||||
|
|
@ -234,23 +234,23 @@ To get in touch, open a shell from the service user (searx@searx-archlinux):
|
|||
|
||||
.. code:: sh
|
||||
|
||||
$ sudo -H ./utils/lxc.sh cmd searx-archlinux \
|
||||
./utils/searx.sh shell
|
||||
$ sudo -H ./utils/lxc.sh cmd searxng-archlinux \
|
||||
./utils/searxng.sh shell
|
||||
// exit with [CTRL-D]
|
||||
(searx-pyenv) [searx@searx-archlinux ~]$ ...
|
||||
(searxng-pyenv) [searxng@searxng-archlinux ~]$ ...
|
||||
|
||||
The prompt ``[searx@searx-archlinux]`` signals that you are logged in as system
|
||||
user ``searx`` in the ``searx-archlinux`` container and the python *virtualenv*
|
||||
``(searx-pyenv)`` environment is activated.
|
||||
The prompt ``[searxng@searxng-archlinux]`` signals that you are logged in as system
|
||||
user ``searxng`` in the ``searxng-archlinux`` container and the python *virtualenv*
|
||||
``(searxng-pyenv)`` environment is activated.
|
||||
|
||||
.. tabs::
|
||||
|
||||
.. group-tab:: searx@searx-archlinux
|
||||
.. group-tab:: searxng@searxng-archlinux
|
||||
|
||||
.. code:: sh
|
||||
|
||||
(searx-pyenv) [searx@searx-archlinux ~]$ pwd
|
||||
/usr/local/searx
|
||||
(searxng-pyenv) [searxng@searxng-archlinux ~]$ pwd
|
||||
/usr/local/searxng
|
||||
|
||||
|
||||
|
||||
|
|
@ -261,13 +261,13 @@ In this section we will see how to change the *"Fully functional SearXNG suite"*
|
|||
from a LXC container (which is quite ready for production) into a developer
|
||||
suite. For this, we have to keep an eye on the :ref:`installation basic`:
|
||||
|
||||
- SearXNG setup in: ``/etc/searx/settings.yml``
|
||||
- SearXNG user's home: ``/usr/local/searx``
|
||||
- virtualenv in: ``/usr/local/searx/searx-pyenv``
|
||||
- SearXNG software in: ``/usr/local/searx/searx-src``
|
||||
- SearXNG setup in: ``/etc/searxng/settings.yml``
|
||||
- SearXNG user's home: ``/usr/local/searxng``
|
||||
- virtualenv in: ``/usr/local/searxng/searxng-pyenv``
|
||||
- SearXNG software in: ``/usr/local/searxng/searxng-src``
|
||||
|
||||
With the use of the :ref:`searx.sh` the SearXNG service was installed as
|
||||
:ref:`uWSGI application <searx uwsgi>`. To maintain this service, we can use
|
||||
With the use of the :ref:`searxng.sh` the SearXNG service was installed as
|
||||
:ref:`uWSGI application <searxng uwsgi>`. To maintain this service, we can use
|
||||
``systemctl`` (compare :ref:`service architectures on distributions <uwsgi
|
||||
configuration>`).
|
||||
|
||||
|
|
@ -277,30 +277,30 @@ configuration>`).
|
|||
|
||||
.. code:: sh
|
||||
|
||||
$ sudo -H ./utils/lxc.sh cmd searx-archlinux \
|
||||
systemctl stop uwsgi@searx
|
||||
$ sudo -H ./utils/lxc.sh cmd searxng-archlinux \
|
||||
systemctl stop uwsgi@searxng
|
||||
|
||||
With the command above, we stopped the SearXNG uWSGI-App in the archlinux
|
||||
container.
|
||||
|
||||
The uWSGI-App for the archlinux dsitros is configured in
|
||||
:origin:`utils/templates/etc/uwsgi/apps-archlinux/searx.ini`, from where at
|
||||
:origin:`utils/templates/etc/uwsgi/apps-archlinux/searxng.ini`, from where at
|
||||
least you should attend the settings of ``uid``, ``chdir``, ``env`` and
|
||||
``http``::
|
||||
|
||||
env = SEARX_SETTINGS_PATH=/etc/searx/settings.yml
|
||||
env = SEARXNG_SETTINGS_PATH=/etc/searxng/settings.yml
|
||||
http = 127.0.0.1:8888
|
||||
|
||||
chdir = /usr/local/searx/searx-src/searx
|
||||
virtualenv = /usr/local/searx/searx-pyenv
|
||||
pythonpath = /usr/local/searx/searx-src
|
||||
chdir = /usr/local/searxng/searxng-src/searxng
|
||||
virtualenv = /usr/local/searxng/searxng-pyenv
|
||||
pythonpath = /usr/local/searxng/searxng-src
|
||||
|
||||
If you have read the :ref:`"Good to know section" <lxc.sh>` you remember, that
|
||||
each container shares the root folder of the repository and the command
|
||||
``utils/lxc.sh cmd`` handles relative path names **transparent**. To wrap the
|
||||
SearXNG installation into a developer one, we simple have to create a smylink to
|
||||
the **transparent** reposetory from the desktop. Now lets replace the
|
||||
repository at ``searx-src`` in the container with the working tree from outside
|
||||
repository at ``searxng-src`` in the container with the working tree from outside
|
||||
of the container:
|
||||
|
||||
.. tabs::
|
||||
|
|
@ -309,11 +309,11 @@ of the container:
|
|||
|
||||
.. code:: sh
|
||||
|
||||
$ sudo -H ./utils/lxc.sh cmd searx-archlinux \
|
||||
mv /usr/local/searx/searx-src /usr/local/searx/searx-src.old
|
||||
$ sudo -H ./utils/lxc.sh cmd searxng-archlinux \
|
||||
mv /usr/local/searxng/searxng-src /usr/local/searxng/searxng-src.old
|
||||
|
||||
$ sudo -H ./utils/lxc.sh cmd searx-archlinux \
|
||||
ln -s /share/searx/ /usr/local/searx/searx-src
|
||||
$ sudo -H ./utils/lxc.sh cmd searxng-archlinux \
|
||||
ln -s /share/searxng/ /usr/local/searxng/searxng-src
|
||||
|
||||
Now we can develop as usual in the working tree of our desktop system. Every
|
||||
time the software was changed, you have to restart the SearXNG service (in the
|
||||
|
|
@ -325,8 +325,8 @@ conatiner):
|
|||
|
||||
.. code:: sh
|
||||
|
||||
$ sudo -H ./utils/lxc.sh cmd searx-archlinux \
|
||||
systemctl restart uwsgi@searx
|
||||
$ sudo -H ./utils/lxc.sh cmd searxng-archlinux \
|
||||
systemctl restart uwsgi@searxng
|
||||
|
||||
|
||||
Remember: :ref:`working in containers` .. here are just some examples from my
|
||||
|
|
@ -340,28 +340,28 @@ daily usage:
|
|||
|
||||
.. code:: sh
|
||||
|
||||
$ sudo -H ./utils/lxc.sh cmd searx-archlinux \
|
||||
./utils/searx.sh inspect service
|
||||
$ sudo -H ./utils/lxc.sh cmd searxng-archlinux \
|
||||
./utils/searxng.sh inspect service
|
||||
|
||||
Run :ref:`makefile`, e.g. to test inside the container:
|
||||
|
||||
.. code:: sh
|
||||
|
||||
$ sudo -H ./utils/lxc.sh cmd searx-archlinux \
|
||||
$ sudo -H ./utils/lxc.sh cmd searxng-archlinux \
|
||||
make test
|
||||
|
||||
To install all prerequisites needed for a :ref:`buildhosts`:
|
||||
|
||||
.. code:: sh
|
||||
|
||||
$ sudo -H ./utils/lxc.sh cmd searx-archlinux \
|
||||
./utils/searx.sh install buildhost
|
||||
$ sudo -H ./utils/lxc.sh cmd searxng-archlinux \
|
||||
./utils/searxng.sh install buildhost
|
||||
|
||||
To build the docs on a buildhost :ref:`buildhosts`:
|
||||
|
||||
.. code:: sh
|
||||
|
||||
$ sudo -H ./utils/lxc.sh cmd searx-archlinux \
|
||||
$ sudo -H ./utils/lxc.sh cmd searxng-archlinux \
|
||||
make docs.html
|
||||
|
||||
.. _lxcdev summary:
|
||||
|
|
@ -373,14 +373,14 @@ We build up a fully functional SearXNG suite in a archlinux container:
|
|||
|
||||
.. code:: sh
|
||||
|
||||
$ sudo -H ./utils/lxc.sh install suite searx-archlinux
|
||||
$ sudo -H ./utils/lxc.sh install suite searxng-archlinux
|
||||
|
||||
To access HTTP from the desktop we installed nginx for the services inside the
|
||||
conatiner:
|
||||
|
||||
.. tabs::
|
||||
|
||||
.. group-tab:: [root@searx-archlinux]
|
||||
.. group-tab:: [root@searxng-archlinux]
|
||||
|
||||
.. code:: sh
|
||||
|
||||
|
|
@ -393,13 +393,13 @@ the container :
|
|||
|
||||
.. tabs::
|
||||
|
||||
.. group-tab:: [root@searx-archlinux]
|
||||
.. group-tab:: [root@searxng-archlinux]
|
||||
|
||||
.. code:: sh
|
||||
|
||||
$ mv /usr/local/searx/searx-src /usr/local/searx/searx-src.old
|
||||
$ ln -s /share/searx/ /usr/local/searx/searx-src
|
||||
$ systemctl restart uwsgi@searx
|
||||
$ mv /usr/local/searxng/searxng-src /usr/local/searxng/searxng-src.old
|
||||
$ ln -s /share/searxng/ /usr/local/searxng/searxng-src
|
||||
$ systemctl restart uwsgi@searxng
|
||||
|
||||
To get information about the searxNG suite in the archlinux container we can
|
||||
use:
|
||||
|
|
@ -410,11 +410,11 @@ use:
|
|||
|
||||
.. code:: sh
|
||||
|
||||
$ sudo -H ./utils/lxc.sh show suite searx-archlinux
|
||||
$ sudo -H ./utils/lxc.sh show suite searxng-archlinux
|
||||
...
|
||||
[searx-archlinux] INFO: (eth0) filtron: http://10.174.184.156:4004/ http://10.174.184.156/searx
|
||||
[searx-archlinux] INFO: (eth0) morty: http://10.174.184.156:3000/
|
||||
[searx-archlinux] INFO: (eth0) docs.live: http://10.174.184.156:8080/
|
||||
[searx-archlinux] INFO: (eth0) IPv6: http://[fd42:573b:e0b3:e97e:216:3eff:fea5:9b65]
|
||||
[searxng-archlinux] INFO: (eth0) filtron: http://10.174.184.156:4004/ http://10.174.184.156/searxng
|
||||
[searxng-archlinux] INFO: (eth0) morty: http://10.174.184.156:3000/
|
||||
[searxng-archlinux] INFO: (eth0) docs.live: http://10.174.184.156:8080/
|
||||
[searxng-archlinux] INFO: (eth0) IPv6: http://[fd42:573b:e0b3:e97e:216:3eff:fea5:9b65]
|
||||
...
|
||||
|
||||
|
|
|
|||
|
|
@ -40,16 +40,16 @@ We do no longer need to build up the virtualenv manually. Jump into your git
|
|||
working tree and release a ``make install`` to get a virtualenv with a
|
||||
*developer install* of SearXNG (:origin:`setup.py`). ::
|
||||
|
||||
$ cd ~/searx-clone
|
||||
$ cd ~/searxng-clone
|
||||
$ make install
|
||||
PYENV [virtualenv] installing ./requirements*.txt into local/py3
|
||||
...
|
||||
PYENV OK
|
||||
PYENV [install] pip install -e 'searx[test]'
|
||||
PYENV [install] pip install -e 'searxng[test]'
|
||||
...
|
||||
Successfully installed argparse-1.4.0 searx
|
||||
BUILDENV INFO:searx:load the default settings from ./searx/settings.yml
|
||||
BUILDENV INFO:searx:Initialisation done
|
||||
Successfully installed argparse-1.4.0 searxng
|
||||
BUILDENV INFO:searxng:load the default settings from ./searxng/settings.yml
|
||||
BUILDENV INFO:searxng:Initialisation done
|
||||
BUILDENV build utils/brand.env
|
||||
|
||||
If you release ``make install`` multiple times the installation will only
|
||||
|
|
@ -66,11 +66,11 @@ the check fails if you edit the requirements listed in
|
|||
PYENV [virtualenv] installing ./requirements*.txt into local/py3
|
||||
...
|
||||
PYENV OK
|
||||
PYENV [install] pip install -e 'searx[test]'
|
||||
PYENV [install] pip install -e 'searxng[test]'
|
||||
...
|
||||
Successfully installed argparse-1.4.0 searx
|
||||
BUILDENV INFO:searx:load the default settings from ./searx/settings.yml
|
||||
BUILDENV INFO:searx:Initialisation done
|
||||
Successfully installed argparse-1.4.0 searxng
|
||||
BUILDENV INFO:searxng:load the default settings from ./searxng/settings.yml
|
||||
BUILDENV INFO:searxng:Initialisation done
|
||||
BUILDENV build utils/brand.env
|
||||
|
||||
.. sidebar:: drop environment
|
||||
|
|
@ -107,10 +107,10 @@ The ``make buildenv`` target will update the *build environment* in:
|
|||
Tasks running outside of an *installed instance*, need the following settings
|
||||
from the YAML configuration:
|
||||
|
||||
- ``SEARX_URL`` from :ref:`server.base_url <settings global server>` (aka
|
||||
- ``SEARXNG_URL`` from :ref:`server.base_url <settings global server>` (aka
|
||||
``PUBLIC_URL``)
|
||||
- ``SEARX_BIND_ADDRESS`` from :ref:`server.bind_address <settings global server>`
|
||||
- ``SEARX_PORT`` from :ref:`server.port <settings global server>`
|
||||
- ``SEARXNG_BIND_ADDRESS`` from :ref:`server.bind_address <settings global server>`
|
||||
- ``SEARXNG_PORT`` from :ref:`server.port <settings global server>`
|
||||
|
||||
.. _make run:
|
||||
|
||||
|
|
@ -118,13 +118,13 @@ from the YAML configuration:
|
|||
============
|
||||
|
||||
To get up a running a developer instance simply call ``make run``. This enables
|
||||
*debug* option in :origin:`searx/settings.yml`, starts a ``./searx/webapp.py``
|
||||
*debug* option in :origin:`searxng/settings.yml`, starts a ``./searxng/webapp.py``
|
||||
instance, disables *debug* option again and opens the URL in your favorite WEB
|
||||
browser (:man:`xdg-open`)::
|
||||
|
||||
$ make run
|
||||
PYENV OK
|
||||
SEARX_DEBUG=1 ./manage.sh pyenv.cmd python ./searx/webapp.py
|
||||
SEARXNG_DEBUG=1 ./manage.sh pyenv.cmd python ./searxng/webapp.py
|
||||
...
|
||||
INFO:werkzeug: * Running on http://127.0.0.1:8888/ (Press CTRL+C to quit)
|
||||
|
||||
|
|
@ -210,15 +210,15 @@ by underline::
|
|||
|
||||
make search.checker.google_news
|
||||
|
||||
To see HTTP requests and more use SEARX_DEBUG::
|
||||
To see HTTP requests and more use SEARXNG_DEBUG::
|
||||
|
||||
make SEARX_DEBUG=1 search.checker.google_news
|
||||
make SEARXNG_DEBUG=1 search.checker.google_news
|
||||
|
||||
.. _3xx: https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#3xx_redirection
|
||||
|
||||
To filter out HTTP redirects (3xx_)::
|
||||
|
||||
make SEARX_DEBUG=1 search.checker.google_news | grep -A1 "HTTP/1.1\" 3[0-9][0-9]"
|
||||
make SEARXNG_DEBUG=1 search.checker.google_news | grep -A1 "HTTP/1.1\" 3[0-9][0-9]"
|
||||
...
|
||||
Engine google news Checking
|
||||
https://news.google.com:443 "GET /search?q=life&hl=en&lr=lang_en&ie=utf8&oe=utf8&ceid=US%3Aen&gl=US HTTP/1.1" 302 0
|
||||
|
|
@ -246,8 +246,8 @@ Build Python packages in ``./dist/py``::
|
|||
running bdist_wheel
|
||||
|
||||
$ ls ./dist
|
||||
searx-0.18.0-py3-none-any.whl searx-0.18.0.tar.gz
|
||||
searxng-0.18.0-py3-none-any.whl searxng-0.18.0.tar.gz
|
||||
|
||||
To upload packages to PyPi_, there is also a ``pypi.upload`` target (to test use
|
||||
``pypi.upload.test``). Since you are not the owner of :pypi:`searx` you will
|
||||
``pypi.upload.test``). Since you are not the owner of :pypi:`searxng` you will
|
||||
never need to upload.
|
||||
|
|
|
|||
|
|
@ -9,28 +9,28 @@ Offline Engines
|
|||
- :ref:`demo offline engine`
|
||||
- :ref:`sql engines`
|
||||
- :ref:`engine command`
|
||||
- :origin:`Redis <searx/engines/redis_server.py>`
|
||||
- :origin:`Redis <searxng/engines/redis_server.py>`
|
||||
|
||||
To extend the functionality of SearXNG, offline engines are going to be
|
||||
introduced. An offline engine is an engine which does not need Internet
|
||||
connection to perform a search and does not use HTTP to communicate.
|
||||
|
||||
Offline engines can be configured, by adding those to the `engines` list of
|
||||
:origin:`settings.yml <searx/settings.yml>`. An example skeleton for offline
|
||||
:origin:`settings.yml <searxng/settings.yml>`. An example skeleton for offline
|
||||
engines can be found in :ref:`demo offline engine` (:origin:`demo_offline.py
|
||||
<searx/engines/demo_offline.py>`).
|
||||
<searxng/engines/demo_offline.py>`).
|
||||
|
||||
|
||||
Programming Interface
|
||||
=====================
|
||||
|
||||
:py:func:`init(engine_settings=None) <searx.engines.demo_offline.init>`
|
||||
:py:func:`init(engine_settings=None) <searxng.engines.demo_offline.init>`
|
||||
All offline engines can have their own init function to setup the engine before
|
||||
accepting requests. The function gets the settings from settings.yml as a
|
||||
parameter. This function can be omitted, if there is no need to setup anything
|
||||
in advance.
|
||||
|
||||
:py:func:`search(query, params) <searx.engines.demo_offline.searc>`
|
||||
:py:func:`search(query, params) <searxng.engines.demo_offline.searc>`
|
||||
|
||||
Each offline engine has a function named ``search``. This function is
|
||||
responsible to perform a search and return the results in a presentable
|
||||
|
|
@ -55,10 +55,10 @@ admins can install packages in advance.
|
|||
|
||||
If there is a need to install additional packages in *Python's Virtual
|
||||
Environment* of your SearXNG instance you need to switch into the environment
|
||||
(:ref:`searx-src`) first, for this you can use :ref:`searx.sh`::
|
||||
(:ref:`searxng-src`) first, for this you can use :ref:`searxng.sh`::
|
||||
|
||||
$ sudo utils/searx.sh shell
|
||||
(searx-pyenv)$ pip install ...
|
||||
$ sudo utils/searxng.sh shell
|
||||
(searxng-pyenv)$ pip install ...
|
||||
|
||||
|
||||
Private engines (Security)
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ Plugins
|
|||
|
||||
- :ref:`plugins generic`
|
||||
|
||||
Plugins can extend or replace functionality of various components of searx.
|
||||
Plugins can extend or replace functionality of various components of searxng.
|
||||
|
||||
Example plugin
|
||||
==============
|
||||
|
|
@ -41,7 +41,7 @@ Register your plugin
|
|||
====================
|
||||
|
||||
To enable your plugin register your plugin in
|
||||
searx > plugin > __init__.py.
|
||||
searxng > plugin > __init__.py.
|
||||
And at the bottom of the file add your plugin like.
|
||||
``plugins.register(name_of_python_file)``
|
||||
|
||||
|
|
@ -65,7 +65,7 @@ plugin. A plugin doesn't need to implement all the hooks.
|
|||
* False to stop the search
|
||||
|
||||
:param flask.request request:
|
||||
:param searx.search.SearchWithPlugins search:
|
||||
:param searxng.search.SearchWithPlugins search:
|
||||
:return: False to stop the search
|
||||
:rtype: bool
|
||||
|
||||
|
|
@ -75,7 +75,7 @@ plugin. A plugin doesn't need to implement all the hooks.
|
|||
Runs AFTER the search request.
|
||||
|
||||
:param flask.request request: Flask request.
|
||||
:param searx.search.SearchWithPlugins search: Context.
|
||||
:param searxng.search.SearchWithPlugins search: Context.
|
||||
|
||||
|
||||
.. py:function:: on_result(request, search, result) -> bool
|
||||
|
|
@ -95,7 +95,7 @@ plugin. A plugin doesn't need to implement all the hooks.
|
|||
* False to remove the result
|
||||
|
||||
:param flask.request request:
|
||||
:param searx.search.SearchWithPlugins search:
|
||||
:param searxng.search.SearchWithPlugins search:
|
||||
:param typing.Dict result: Result, see - :ref:`engine results`
|
||||
:return: True to keep the result
|
||||
:rtype: bool
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ you simply by using :ref:`make <makefile>`.
|
|||
|
||||
.. code:: sh
|
||||
|
||||
git clone https://github.com/searxng/searxng.git searx
|
||||
git clone https://github.com/searxng/searxng.git searxng
|
||||
|
||||
Here is how a minimal workflow looks like:
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ documentation, with the builders from the Sphinx_ project a HTML output is
|
|||
generated and deployed at :docs:`github.io <.>`. For build prerequisites read
|
||||
:ref:`docs build`.
|
||||
|
||||
The source files of Searx's documentation are located at :origin:`docs`. Sphinx
|
||||
The source files of Searxng's documentation are located at :origin:`docs`. Sphinx
|
||||
assumes source files to be encoded in UTF-8 by defaul. Run :ref:`make docs.live
|
||||
<make docs.live>` to build HTML while editing.
|
||||
|
||||
|
|
@ -290,7 +290,7 @@ content becomes smart.
|
|||
files & folders origin :origin:`docs/dev/reST.rst` ``:origin:`docs/dev/reST.rst```
|
||||
pull request :pull:`4` ``:pull:`4```
|
||||
patch :patch:`af2cae6` ``:patch:`af2cae6```
|
||||
PyPi package :pypi:`searx` ``:pypi:`searx```
|
||||
PyPi package :pypi:`searxng` ``:pypi:`searxng```
|
||||
manual page man :man:`bash` ``:man:`bash```
|
||||
intersphinx_
|
||||
--------------------------------------------------------------------------------------------------
|
||||
|
|
@ -494,7 +494,7 @@ Figures & Images
|
|||
is flexible. To get best results in the generated output format, install
|
||||
ImageMagick_ and Graphviz_.
|
||||
|
||||
Searx's sphinx setup includes: :ref:`linuxdoc:kfigure`. Scaleable here means;
|
||||
Searxng's sphinx setup includes: :ref:`linuxdoc:kfigure`. Scaleable here means;
|
||||
scaleable in sense of the build process. Normally in absence of a converter
|
||||
tool, the build process will break. From the authors POV it’s annoying to care
|
||||
about the build process when handling with images, especially since he has no
|
||||
|
|
@ -1288,20 +1288,20 @@ install` (with SearXNG modules installed). We use this e.g. to build chapter:
|
|||
:language: reST
|
||||
:start-after: .. _configured engines:
|
||||
|
||||
The context for the template is selected in the line ``.. jinja:: searx``. In
|
||||
sphinx's build configuration (:origin:`docs/conf.py`) the ``searx`` context
|
||||
The context for the template is selected in the line ``.. jinja:: searxng``. In
|
||||
sphinx's build configuration (:origin:`docs/conf.py`) the ``searxng`` context
|
||||
contains the ``engines`` and ``plugins``.
|
||||
|
||||
.. code:: py
|
||||
|
||||
import searx.search
|
||||
import searx.engines
|
||||
import searx.plugins
|
||||
searx.search.initialize()
|
||||
import searxng.search
|
||||
import searxng.engines
|
||||
import searxng.plugins
|
||||
searxng.search.initialize()
|
||||
jinja_contexts = {
|
||||
'searx': {
|
||||
'engines': searx.engines.engines,
|
||||
'plugins': searx.plugins.plugins
|
||||
'searxng': {
|
||||
'engines': searxng.engines.engines,
|
||||
'plugins': searxng.plugins.plugins
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ Parameters
|
|||
``q`` : required
|
||||
The search query. This string is passed to external search services. Thus,
|
||||
SearXNG supports syntax of each search service. For example, ``site:github.com
|
||||
searx`` is a valid query for Google. However, if simply the query above is
|
||||
searxng`` is a valid query for Google. However, if simply the query above is
|
||||
passed to any search engine which does not filter its results based on this
|
||||
syntax, you might not get the results you wanted.
|
||||
|
||||
|
|
@ -62,7 +62,7 @@ Parameters
|
|||
``image_proxy`` : default ``False``
|
||||
[ ``True``, ``False`` ]
|
||||
|
||||
Proxy image results through searx.
|
||||
Proxy image results through searxng.
|
||||
|
||||
``autocomplete`` : default *empty*
|
||||
[ ``google``, ``dbpedia``, ``duckduckgo``, ``startpage``, ``wikipedia`` ]
|
||||
|
|
@ -112,9 +112,9 @@ Parameters
|
|||
``Vim-like_hotkeys``, ``Self_Informations``, ``Tracker_URL_remover``,
|
||||
``Search_on_category_select``, ``Hostname_replace``
|
||||
|
||||
``enabled_engines`` : optional : *all* :origin:`engines <searx/engines>`
|
||||
``enabled_engines`` : optional : *all* :origin:`engines <searxng/engines>`
|
||||
List of enabled engines.
|
||||
|
||||
``disabled_engines`` : optional : *all* :origin:`engines <searx/engines>`
|
||||
``disabled_engines`` : optional : *all* :origin:`engines <searxng/engines>`
|
||||
List of disabled engines.
|
||||
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
|
@ -6,7 +6,7 @@ Welcome to SearXNG
|
|||
|
||||
.. hint::
|
||||
|
||||
This is not searx, but searxng.
|
||||
This is not searxng, but searxng.
|
||||
|
||||
SearXNG is a free internet metasearch engine which aggregates results from more
|
||||
than 70 search services. Users are neither tracked nor profiled. Additionally,
|
||||
|
|
@ -32,7 +32,7 @@ If you don't trust anyone, you can set up your own, see :ref:`installation`.
|
|||
user/index
|
||||
admin/index
|
||||
dev/index
|
||||
searx_extra/index
|
||||
searxng_extra/index
|
||||
utils/index
|
||||
src/index
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +0,0 @@
|
|||
|
||||
.. _standalone_searx.py:
|
||||
|
||||
===================================
|
||||
``searx_extra/standalone_searx.py``
|
||||
===================================
|
||||
|
||||
.. automodule:: searx_extra.standalone_searx
|
||||
:members:
|
||||
|
|
@ -1,14 +1,14 @@
|
|||
.. _searx_extra:
|
||||
.. _searxng_extra:
|
||||
|
||||
======================================================
|
||||
Tooling box ``searx_extra`` for developers and users
|
||||
Tooling box ``searxng_extra`` for developers and users
|
||||
======================================================
|
||||
|
||||
In the folder :origin:`searx_extra/` we maintain some tools useful for
|
||||
In the folder :origin:`searxng_extra/` we maintain some tools useful for
|
||||
developers and users.
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:caption: Contents
|
||||
|
||||
standalone_searx.py
|
||||
standalone_searxng.py
|
||||
9
docs/searxng_extra/standalone_searxng.py.rst
Normal file
9
docs/searxng_extra/standalone_searxng.py.rst
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
|
||||
.. _standalone_searxng.py:
|
||||
|
||||
===================================
|
||||
``searxng_extra/standalone_searxng.py``
|
||||
===================================
|
||||
|
||||
.. automodule:: searxng_extra.standalone_searx
|
||||
:members:
|
||||
|
|
@ -11,4 +11,4 @@ every item from the source code, but we will add documentation when requested.
|
|||
:caption: Contents
|
||||
:glob:
|
||||
|
||||
searx.*
|
||||
searxng.*
|
||||
|
|
|
|||
|
|
@ -1,8 +0,0 @@
|
|||
.. _searx.locales:
|
||||
|
||||
=======
|
||||
Locales
|
||||
=======
|
||||
|
||||
.. automodule:: searx.locales
|
||||
:members:
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
.. _searx.search:
|
||||
|
||||
======
|
||||
Search
|
||||
======
|
||||
|
||||
.. autoclass:: searx.search.EngineRef
|
||||
:members:
|
||||
|
||||
.. autoclass:: searx.search.SearchQuery
|
||||
:members:
|
||||
|
||||
.. autoclass:: searx.search.Search
|
||||
|
||||
.. attribute:: search_query
|
||||
:type: searx.search.SearchQuery
|
||||
|
||||
.. attribute:: result_container
|
||||
:type: searx.results.ResultContainer
|
||||
|
||||
.. automethod:: search() -> searx.results.ResultContainer
|
||||
|
||||
.. autoclass:: searx.search.SearchWithPlugins
|
||||
:members:
|
||||
|
||||
.. attribute:: search_query
|
||||
:type: searx.search.SearchQuery
|
||||
|
||||
.. attribute:: result_container
|
||||
:type: searx.results.ResultContainer
|
||||
|
||||
.. attribute:: ordered_plugin_list
|
||||
:type: typing.List
|
||||
|
||||
.. attribute:: request
|
||||
:type: flask.request
|
||||
|
||||
.. automethod:: search() -> searx.results.ResultContainer
|
||||
|
|
@ -4,6 +4,6 @@
|
|||
Demo Offline Engine
|
||||
===================
|
||||
|
||||
.. automodule:: searx.engines.demo_offline
|
||||
.. automodule:: searxng.engines.demo_offline
|
||||
:members:
|
||||
|
||||
|
|
@ -4,6 +4,6 @@
|
|||
Demo Online Engine
|
||||
==================
|
||||
|
||||
.. automodule:: searx.engines.demo_online
|
||||
.. automodule:: searxng.engines.demo_online
|
||||
:members:
|
||||
|
||||
|
|
@ -27,7 +27,7 @@ Definitions`_. Not all parameters can be appied and some engines are *special*
|
|||
Google WEB
|
||||
==========
|
||||
|
||||
.. automodule:: searx.engines.google
|
||||
.. automodule:: searxng.engines.google
|
||||
:members:
|
||||
|
||||
.. _google images engine:
|
||||
|
|
@ -35,7 +35,7 @@ Google WEB
|
|||
Google Images
|
||||
=============
|
||||
|
||||
.. automodule:: searx.engines.google_images
|
||||
.. automodule:: searxng.engines.google_images
|
||||
:members:
|
||||
|
||||
.. _google videos engine:
|
||||
|
|
@ -43,7 +43,7 @@ Google Images
|
|||
Google Videos
|
||||
=============
|
||||
|
||||
.. automodule:: searx.engines.google_videos
|
||||
.. automodule:: searxng.engines.google_videos
|
||||
:members:
|
||||
|
||||
.. _google news engine:
|
||||
|
|
@ -51,5 +51,5 @@ Google Videos
|
|||
Google News
|
||||
===========
|
||||
|
||||
.. automodule:: searx.engines.google_news
|
||||
.. automodule:: searxng.engines.google_news
|
||||
:members:
|
||||
|
|
@ -4,5 +4,5 @@
|
|||
Load Engines
|
||||
============
|
||||
|
||||
.. automodule:: searx.engines
|
||||
.. automodule:: searxng.engines
|
||||
:members:
|
||||
8
docs/src/searxng.locales.rst
Normal file
8
docs/src/searxng.locales.rst
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
.. _searxng.locales:
|
||||
|
||||
=======
|
||||
Locales
|
||||
=======
|
||||
|
||||
.. automodule:: searxng.locales
|
||||
:members:
|
||||
38
docs/src/searxng.search.rst
Normal file
38
docs/src/searxng.search.rst
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
.. _searxng.search:
|
||||
|
||||
======
|
||||
Search
|
||||
======
|
||||
|
||||
.. autoclass:: searxng.search.EngineRef
|
||||
:members:
|
||||
|
||||
.. autoclass:: searxng.search.SearchQuery
|
||||
:members:
|
||||
|
||||
.. autoclass:: searxng.search.Search
|
||||
|
||||
.. attribute:: search_query
|
||||
:type: searxng.search.SearchQuery
|
||||
|
||||
.. attribute:: result_container
|
||||
:type: searxng.results.ResultContainer
|
||||
|
||||
.. automethod:: search() -> searxng.results.ResultContainer
|
||||
|
||||
.. autoclass:: searxng.search.SearchWithPlugins
|
||||
:members:
|
||||
|
||||
.. attribute:: search_query
|
||||
:type: searxng.search.SearchQuery
|
||||
|
||||
.. attribute:: result_container
|
||||
:type: searxng.results.ResultContainer
|
||||
|
||||
.. attribute:: ordered_plugin_list
|
||||
:type: typing.List
|
||||
|
||||
.. attribute:: request
|
||||
:type: flask.request
|
||||
|
||||
.. automethod:: search() -> searxng.results.ResultContainer
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
.. sidebar:: further reading
|
||||
|
||||
- :ref:`searx filtron`
|
||||
- :ref:`searxng filtron`
|
||||
- :ref:`architecture`
|
||||
- :ref:`installation` (:ref:`nginx <installation nginx>` & :ref:`apache
|
||||
<installation apache>`)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
.. _searx_utils:
|
||||
.. _searxng_utils:
|
||||
.. _toolboxing:
|
||||
|
||||
===================
|
||||
|
|
@ -11,7 +11,7 @@ In the folder :origin:`utils/` we maintain some tools useful for administrators.
|
|||
:maxdepth: 2
|
||||
:caption: Contents
|
||||
|
||||
searx.sh
|
||||
searxng.sh
|
||||
filtron.sh
|
||||
morty.sh
|
||||
lxc.sh
|
||||
|
|
@ -36,7 +36,7 @@ Scripts to maintain services often dispose of common commands and environments.
|
|||
Sets timeout for interactive prompts. If you want to run a script in batch
|
||||
job, with defaults choices, set ``FORCE_TIMEOUT=0``. By example; to install a
|
||||
reverse proxy for filtron on all containers of the :ref:`SearXNG suite
|
||||
<lxc-searx.env>` use ::
|
||||
<lxc-searxng.env>` use ::
|
||||
|
||||
sudo -H ./utils/lxc.sh cmd -- FORCE_TIMEOUT=0 ./utils/filtron.sh apache install
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
With the use of *Linux Containers* (LXC_) we can scale our tasks over a stack of
|
||||
containers, what we call the: *lxc suite*. The *SearXNG suite*
|
||||
(:origin:`lxc-searx.env <utils/lxc-searx.env>`) is loaded by default, every time
|
||||
(:origin:`lxc-searxng.env <utils/lxc-searxng.env>`) is loaded by default, every time
|
||||
you start the ``lxc.sh`` script (*you do not need to care about*).
|
||||
|
||||
Before you can start with containers, you need to install and initiate LXD_
|
||||
|
|
@ -49,7 +49,7 @@ help>`.
|
|||
|
||||
If you do not want to build all containers, **you can build just one**::
|
||||
|
||||
$ sudo -H ./utils/lxc.sh build searx-ubu1804
|
||||
$ sudo -H ./utils/lxc.sh build searxng-ubu1804
|
||||
|
||||
*Good to know ...*
|
||||
|
||||
|
|
@ -62,9 +62,9 @@ of::
|
|||
|
||||
In the containers, you can run what ever you want, e.g. to start a bash use::
|
||||
|
||||
$ sudo -H ./utils/lxc.sh cmd searx-ubu1804 bash
|
||||
INFO: [searx-ubu1804] bash
|
||||
root@searx-ubu1804:/share/searx#
|
||||
$ sudo -H ./utils/lxc.sh cmd searxng-ubu1804 bash
|
||||
INFO: [searxng-ubu1804] bash
|
||||
root@searxng-ubu1804:/share/searxng#
|
||||
|
||||
If there comes the time you want to **get rid off all** the containers and
|
||||
**clean up local images** just type::
|
||||
|
|
@ -120,8 +120,8 @@ Reboot your system and check the iptables rules::
|
|||
Install suite
|
||||
=============
|
||||
|
||||
To install the complete :ref:`SearXNG suite (includes searx, morty & filtron)
|
||||
<lxc-searx.env>` into all LXC_ use::
|
||||
To install the complete :ref:`SearXNG suite (includes searxng, morty & filtron)
|
||||
<lxc-searxng.env>` into all LXC_ use::
|
||||
|
||||
$ sudo -H ./utils/lxc.sh install suite
|
||||
|
||||
|
|
@ -131,12 +131,12 @@ command. To test instances from containers just open the URLs in your
|
|||
WEB-Browser::
|
||||
|
||||
$ sudo ./utils/lxc.sh show suite | grep filtron
|
||||
[searx-ubu1604] INFO: (eth0) filtron: http://n.n.n.246:4004/ http://n.n.n.246/searx
|
||||
[searx-ubu1804] INFO: (eth0) filtron: http://n.n.n.147:4004/ http://n.n.n.147/searx
|
||||
[searx-ubu1910] INFO: (eth0) filtron: http://n.n.n.140:4004/ http://n.n.n.140/searx
|
||||
[searx-ubu2004] INFO: (eth0) filtron: http://n.n.n.18:4004/ http://n.n.n.18/searx
|
||||
[searx-fedora31] INFO: (eth0) filtron: http://n.n.n.46:4004/ http://n.n.n.46/searx
|
||||
[searx-archlinux] INFO: (eth0) filtron: http://n.n.n.32:4004/ http://n.n.n.32/searx
|
||||
[searxng-ubu1604] INFO: (eth0) filtron: http://n.n.n.246:4004/ http://n.n.n.246/searxng
|
||||
[searxng-ubu1804] INFO: (eth0) filtron: http://n.n.n.147:4004/ http://n.n.n.147/searxng
|
||||
[searxng-ubu1910] INFO: (eth0) filtron: http://n.n.n.140:4004/ http://n.n.n.140/searxng
|
||||
[searxng-ubu2004] INFO: (eth0) filtron: http://n.n.n.18:4004/ http://n.n.n.18/searxng
|
||||
[searxng-fedora31] INFO: (eth0) filtron: http://n.n.n.46:4004/ http://n.n.n.46/searxng
|
||||
[searxng-archlinux] INFO: (eth0) filtron: http://n.n.n.32:4004/ http://n.n.n.32/searxng
|
||||
|
||||
To :ref:`install a nginx <installation nginx>` reverse proxy for filtron and
|
||||
morty use (or alternatively use :ref:`apache <installation apache>`)::
|
||||
|
|
@ -152,8 +152,8 @@ Running commands
|
|||
:ref:`toolboxing`. By example: to setup a :ref:`buildhosts` and run the
|
||||
Makefile target ``test`` in the archlinux_ container::
|
||||
|
||||
sudo -H ./utils/lxc.sh cmd searx-archlinux ./utils/searx.sh install buildhost
|
||||
sudo -H ./utils/lxc.sh cmd searx-archlinux make test
|
||||
sudo -H ./utils/lxc.sh cmd searxng-archlinux ./utils/searxng.sh install buildhost
|
||||
sudo -H ./utils/lxc.sh cmd searxng-archlinux make test
|
||||
|
||||
|
||||
Setup SearXNG buildhost
|
||||
|
|
@ -164,11 +164,11 @@ The installation procedure to set up a :ref:`build host<buildhosts>` takes its
|
|||
time. Installation in all containers will take more time (time for another cup
|
||||
of coffee).::
|
||||
|
||||
sudo -H ./utils/lxc.sh cmd -- ./utils/searx.sh install buildhost
|
||||
sudo -H ./utils/lxc.sh cmd -- ./utils/searxng.sh install buildhost
|
||||
|
||||
To build (live) documentation inside a archlinux_ container::
|
||||
|
||||
sudo -H ./utils/lxc.sh cmd searx-archlinux make docs.clean docs.live
|
||||
sudo -H ./utils/lxc.sh cmd searxng-archlinux make docs.clean docs.live
|
||||
...
|
||||
[I 200331 15:00:42 server:296] Serving on http://0.0.0.0:8080
|
||||
|
||||
|
|
@ -176,7 +176,7 @@ To get IP of the container and the port number *live docs* is listening::
|
|||
|
||||
$ sudo ./utils/lxc.sh show suite | grep docs.live
|
||||
...
|
||||
[searx-archlinux] INFO: (eth0) docs.live: http://n.n.n.12:8080/
|
||||
[searxng-archlinux] INFO: (eth0) docs.live: http://n.n.n.12:8080/
|
||||
|
||||
|
||||
.. _lxc.sh help:
|
||||
|
|
@ -189,10 +189,10 @@ The ``--help`` output of the script is largely self-explanatory:
|
|||
.. program-output:: ../utils/lxc.sh --help
|
||||
|
||||
|
||||
.. _lxc-searx.env:
|
||||
.. _lxc-searxng.env:
|
||||
|
||||
SearXNG suite
|
||||
=============
|
||||
|
||||
.. literalinclude:: ../../utils/lxc-searx.env
|
||||
.. literalinclude:: ../../utils/lxc-searxng.env
|
||||
:language: bash
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
- :ref:`architecture`
|
||||
- :ref:`installation` (:ref:`nginx <installation nginx>` & :ref:`apache
|
||||
<installation apache>`)
|
||||
- :ref:`searx morty`
|
||||
- :ref:`searxng morty`
|
||||
|
||||
To simplify installation and maintenance of a morty_ instance you can use the
|
||||
script :origin:`utils/morty.sh`. In most cases you will install morty_ simply by
|
||||
|
|
@ -37,7 +37,7 @@ into this user account:
|
|||
|
||||
.. hint::
|
||||
|
||||
To add morty to your SearXNG instance read chapter :ref:`searx morty`.
|
||||
To add morty to your SearXNG instance read chapter :ref:`searxng morty`.
|
||||
|
||||
Create user
|
||||
===========
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
|
||||
.. _searx.sh:
|
||||
.. _searxng.sh:
|
||||
|
||||
==================
|
||||
``utils/searx.sh``
|
||||
``utils/searxng.sh``
|
||||
==================
|
||||
|
||||
.. sidebar:: further reading
|
||||
|
|
@ -13,7 +13,7 @@
|
|||
- :ref:`installation apache`
|
||||
|
||||
To simplify installation and maintenance of a SearXNG instance you can use the
|
||||
script :origin:`utils/searx.sh`.
|
||||
script :origin:`utils/searxng.sh`.
|
||||
|
||||
Install
|
||||
=======
|
||||
|
|
@ -22,9 +22,9 @@ In most cases you will install SearXNG simply by running the command:
|
|||
|
||||
.. code:: bash
|
||||
|
||||
sudo -H ./utils/searx.sh install all
|
||||
sudo -H ./utils/searxng.sh install all
|
||||
|
||||
The script adds a ``${SERVICE_USER}`` (default:``searx``) and installs searx
|
||||
The script adds a ``${SERVICE_USER}`` (default:``searxng``) and installs searxng
|
||||
into this user account. The installation is described in chapter
|
||||
:ref:`installation basic`.
|
||||
|
||||
|
|
@ -36,4 +36,4 @@ Overview
|
|||
The ``--help`` output of the script is largely self-explanatory
|
||||
(:ref:`toolboxing common`):
|
||||
|
||||
.. program-output:: ../utils/searx.sh --help
|
||||
.. program-output:: ../utils/searxng.sh --help
|
||||
Loading…
Add table
Add a link
Reference in a new issue