on baddb8d help sign in
searx/docs/admin/installation-apache.rst
95 lines 2.0 kB history raw
1.. _installation apache:
3===================
4Install with apache
5===================
7.. sidebar:: public to the internet?
9 If your searx instance is public, stop here and first install :ref:`filtron
10 reverse proxy <filtron.sh>` and :ref:`result proxy morty <morty.sh>`, see
11 :ref:`installation scripts`.
13.. contents:: Contents
14 :depth: 2
15 :local:
16 :backlinks: entry
18Add wsgi mod
19============
21.. tabs::
23 .. group-tab:: Ubuntu / debian
25 .. code:: sh
27 sudo -H apt-get install libapache2-mod-uwsgi
28 sudo -H a2enmod uwsgi
30Add this configuration in the file ``/etc/apache2/apache2.conf``. To limit
31acces to your intranet replace ``Allow from all`` directive and replace
32``192.168.0.0/16`` with your subnet IP/class.
34.. _inranet apache site:
36Note that if your instance of searx is not at the root, you should change
37``<Location />`` by the location of your instance, like ``<Location /searx>``:
39.. code:: apache
41 # CustomLog /dev/null combined
43 <IfModule mod_uwsgi.c>
45 <Location />
47 Options FollowSymLinks Indexes
48 SetHandler uwsgi-handler
49 uWSGISocket /run/uwsgi/app/searx/socket
51 Order deny,allow
52 Deny from all
53 # Allow from fd00::/8 192.168.0.0/16 fe80::/10 127.0.0.0/8 ::1
54 Allow from all
56 </Location>
58 </IfModule>
60Enable apache mod_uwsgi and restart apache:
62.. tabs::
64 .. group-tab:: Ubuntu / debian
66 .. code:: sh
68 a2enmod uwsgi
69 sudo -H systemctl restart apache2
71disable logs
72============
74For better privacy you can disable Apache logs. Go back to
75``/etc/apache2/apache2.conf`` :ref:`[example] <inranet apache site>` and above
76``<Location />`` activate directive:
78.. code:: apache
80 CustomLog /dev/null combined
82Restart apache:
84.. tabs::
86 .. group-tab:: Ubuntu / debian
88 .. code:: sh
90 sudo -H systemctl restart apache2
92.. warning::
94 You can only disable logs for the whole (virtual) server not for a specific
95 path.