@@ -4,79 +4,53 @@
44uwsgi
55=====
66
7−Create the configuration file ``/etc/uwsgi/apps-available/searx.ini`` with this
8−content:
7+Create the configuration ini-file according to your distribution (see below) and
8+restart the uwsgi application.
99
10−.. code:: ini
10+.. tabs::
1111
12− [uwsgi]
12+ .. group-tab:: Ubuntu / debian
1313
14− # uWSGI core
15− # ----------
16− #
17− # https://uwsgi-docs.readthedocs.io/en/latest/Options.html#uwsgi-core
14+ .. literalinclude:: ../../build/docs/includes/searx.rst
15+ :start-after: START searx uwsgi-description ubuntu-20.04
16+ :end-before: END searx uwsgi-description ubuntu-20.04
1817
19− # Who will run the code
20− uid = searx
21− gid = searx
2218
23− # chdir to specified directory before apps loading
24− chdir = /usr/local/searx/searx-src/searx
19+ .. group-tab:: Arch Linux
2520
26− # disable logging for privacy
27− disable-logging = true
21+ .. literalinclude:: ../../build/docs/includes/searx.rst
22+ :start-after: START searx uwsgi-description arch
23+ :end-before: END searx uwsgi-description arch
2824
29− # The right granted on the created socket
30− chmod-socket = 666
3125
32− # Plugin to use and interpretor config
33− single-interpreter = true
26+ .. group-tab:: Fedora / RHEL
3427
35− # enable master process
36− master = true
28+ .. literalinclude:: ../../build/docs/includes/searx.rst
29+ :start-after: START searx uwsgi-description fedora
30+ :end-before: END searx uwsgi-description fedora
3731
38− # load apps in each worker instead of the master
39− lazy-apps = true
4032
41− # load uWSGI plugins
42− plugin = python3,http
33+.. tabs::
4334
44− # By default the Python plugin does not initialize the GIL. This means your
45− # app-generated threads will not run. If you need threads, remember to enable
46− # them with enable-threads. Running uWSGI in multithreading mode (with the
47− # threads options) will automatically enable threading support. This *strange*
48− # default behaviour is for performance reasons.
49− enable-threads = true
35+ .. group-tab:: Ubuntu / debian
5036
51− # plugin: python
52− # --------------
53− #
54− # https://uwsgi-docs.readthedocs.io/en/latest/Options.html#plugin-python
37+ .. literalinclude:: ../../build/docs/includes/searx.rst
38+ :language: ini
39+ :start-after: START searx uwsgi-appini ubuntu-20.04
40+ :end-before: END searx uwsgi-appini ubuntu-20.04
5541
56− # load a WSGI module
57− module = searx.webapp
42+ .. group-tab:: Arch Linux
5843
59− # set PYTHONHOME/virtualenv
60− virtualenv = /usr/local/searx/searx-pyenv
44+ .. literalinclude:: ../../build/docs/includes/searx.rst
45+ :language: ini
46+ :start-after: START searx uwsgi-appini arch
47+ :end-before: END searx uwsgi-appini arch
6148
62− # add directory (or glob) to pythonpath
63− pythonpath = /usr/local/searx/searx-src
49+ .. group-tab:: Fedora / RHEL
6450
65−
66− # plugin http
67− # -----------
68− #
69− # https://uwsgi-docs.readthedocs.io/en/latest/Options.html#plugin-http
70−
71− # Native HTTP support: https://uwsgi-docs.readthedocs.io/en/latest/HTTP.html
72− http = 127.0.0.1:8888
73−
74−Activate the uwsgi application and restart:
75−
76−.. code:: sh
77−
78− cd /etc/uwsgi/apps-enabled
79− ln -s ../apps-available/searx.ini
80− /etc/init.d/uwsgi restart
51+ .. literalinclude:: ../../build/docs/includes/searx.rst
52+ :language: ini
53+ :start-after: START searx uwsgi-appini fedora
54+ :end-before: END searx uwsgi-appini fedora
8155
8256