|
@@ -4,79 +4,53 @@
|
|
|
uwsgi
|
|
|
=====
|
|
|
|
|
|
-Create the configuration file ``/etc/uwsgi/apps-available/searx.ini`` with this
|
|
|
-content:
|
|
|
+Create the configuration ini-file according to your distribution (see below) and
|
|
|
+restart the uwsgi application.
|
|
|
|
|
|
-.. code:: ini
|
|
|
+.. tabs::
|
|
|
|
|
|
- [uwsgi]
|
|
|
+ .. group-tab:: Ubuntu / debian
|
|
|
|
|
|
- # uWSGI core
|
|
|
- # ----------
|
|
|
- #
|
|
|
- # https://uwsgi-docs.readthedocs.io/en/latest/Options.html#uwsgi-core
|
|
|
+ .. literalinclude:: ../../build/docs/includes/searx.rst
|
|
|
+ :start-after: START searx uwsgi-description ubuntu-20.04
|
|
|
+ :end-before: END searx uwsgi-description ubuntu-20.04
|
|
|
|
|
|
- # Who will run the code
|
|
|
- uid = searx
|
|
|
- gid = searx
|
|
|
|
|
|
- # chdir to specified directory before apps loading
|
|
|
- chdir = /usr/local/searx/searx-src/searx
|
|
|
+ .. group-tab:: Arch Linux
|
|
|
|
|
|
- # disable logging for privacy
|
|
|
- disable-logging = true
|
|
|
+ .. literalinclude:: ../../build/docs/includes/searx.rst
|
|
|
+ :start-after: START searx uwsgi-description arch
|
|
|
+ :end-before: END searx uwsgi-description arch
|
|
|
|
|
|
- # The right granted on the created socket
|
|
|
- chmod-socket = 666
|
|
|
|
|
|
- # Plugin to use and interpretor config
|
|
|
- single-interpreter = true
|
|
|
+ .. group-tab:: Fedora / RHEL
|
|
|
|
|
|
- # enable master process
|
|
|
- master = true
|
|
|
+ .. literalinclude:: ../../build/docs/includes/searx.rst
|
|
|
+ :start-after: START searx uwsgi-description fedora
|
|
|
+ :end-before: END searx uwsgi-description fedora
|
|
|
|
|
|
- # load apps in each worker instead of the master
|
|
|
- lazy-apps = true
|
|
|
|
|
|
- # load uWSGI plugins
|
|
|
- plugin = python3,http
|
|
|
+.. tabs::
|
|
|
|
|
|
- # By default the Python plugin does not initialize the GIL. This means your
|
|
|
- # app-generated threads will not run. If you need threads, remember to enable
|
|
|
- # them with enable-threads. Running uWSGI in multithreading mode (with the
|
|
|
- # threads options) will automatically enable threading support. This *strange*
|
|
|
- # default behaviour is for performance reasons.
|
|
|
- enable-threads = true
|
|
|
+ .. group-tab:: Ubuntu / debian
|
|
|
|
|
|
- # plugin: python
|
|
|
- # --------------
|
|
|
- #
|
|
|
- # https://uwsgi-docs.readthedocs.io/en/latest/Options.html#plugin-python
|
|
|
+ .. literalinclude:: ../../build/docs/includes/searx.rst
|
|
|
+ :language: ini
|
|
|
+ :start-after: START searx uwsgi-appini ubuntu-20.04
|
|
|
+ :end-before: END searx uwsgi-appini ubuntu-20.04
|
|
|
|
|
|
- # load a WSGI module
|
|
|
- module = searx.webapp
|
|
|
+ .. group-tab:: Arch Linux
|
|
|
|
|
|
- # set PYTHONHOME/virtualenv
|
|
|
- virtualenv = /usr/local/searx/searx-pyenv
|
|
|
+ .. literalinclude:: ../../build/docs/includes/searx.rst
|
|
|
+ :language: ini
|
|
|
+ :start-after: START searx uwsgi-appini arch
|
|
|
+ :end-before: END searx uwsgi-appini arch
|
|
|
|
|
|
- # add directory (or glob) to pythonpath
|
|
|
- pythonpath = /usr/local/searx/searx-src
|
|
|
+ .. group-tab:: Fedora / RHEL
|
|
|
|
|
|
-
|
|
|
- # plugin http
|
|
|
- # -----------
|
|
|
- #
|
|
|
- # https://uwsgi-docs.readthedocs.io/en/latest/Options.html#plugin-http
|
|
|
-
|
|
|
- # Native HTTP support: https://uwsgi-docs.readthedocs.io/en/latest/HTTP.html
|
|
|
- http = 127.0.0.1:8888
|
|
|
-
|
|
|
-Activate the uwsgi application and restart:
|
|
|
-
|
|
|
-.. code:: sh
|
|
|
-
|
|
|
- cd /etc/uwsgi/apps-enabled
|
|
|
- ln -s ../apps-available/searx.ini
|
|
|
- /etc/init.d/uwsgi restart
|
|
|
+ .. literalinclude:: ../../build/docs/includes/searx.rst
|
|
|
+ :language: ini
|
|
|
+ :start-after: START searx uwsgi-appini fedora
|
|
|
+ :end-before: END searx uwsgi-appini fedora
|
|
|
|
|
|
|