installation-apache.rst 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. .. _installation apache:
  2. ===================
  3. Install with apache
  4. ===================
  5. .. sidebar:: public to the internet?
  6. If your searx instance is public, stop here and first install :ref:`filtron
  7. reverse proxy <filtron.sh>` and :ref:`result proxy morty <morty.sh>`, see
  8. :ref:`installation scripts`.
  9. .. contents:: Contents
  10. :depth: 2
  11. :local:
  12. :backlinks: entry
  13. Add wsgi mod
  14. ============
  15. .. tabs::
  16. .. group-tab:: Ubuntu / debian
  17. .. code:: sh
  18. sudo -H apt-get install libapache2-mod-uwsgi
  19. sudo -H a2enmod uwsgi
  20. Add this configuration in the file ``/etc/apache2/apache2.conf``. To limit
  21. acces to your intranet replace ``Allow from all`` directive and replace
  22. ``192.168.0.0/16`` with your subnet IP/class.
  23. .. _inranet apache site:
  24. Note that if your instance of searx is not at the root, you should change
  25. ``<Location />`` by the location of your instance, like ``<Location /searx>``:
  26. .. code:: apache
  27. # CustomLog /dev/null combined
  28. <IfModule mod_uwsgi.c>
  29. <Location />
  30. Options FollowSymLinks Indexes
  31. SetHandler uwsgi-handler
  32. uWSGISocket /run/uwsgi/app/searx/socket
  33. Order deny,allow
  34. Deny from all
  35. # Allow from fd00::/8 192.168.0.0/16 fe80::/10 127.0.0.0/8 ::1
  36. Allow from all
  37. </Location>
  38. </IfModule>
  39. Enable apache mod_uwsgi and restart apache:
  40. .. tabs::
  41. .. group-tab:: Ubuntu / debian
  42. .. code:: sh
  43. a2enmod uwsgi
  44. sudo -H systemctl restart apache2
  45. disable logs
  46. ============
  47. For better privacy you can disable Apache logs. Go back to
  48. ``/etc/apache2/apache2.conf`` :ref:`[example] <inranet apache site>` and above
  49. ``<Location />`` activate directive:
  50. .. code:: apache
  51. CustomLog /dev/null combined
  52. Restart apache:
  53. .. tabs::
  54. .. group-tab:: Ubuntu / debian
  55. .. code:: sh
  56. sudo -H systemctl restart apache2
  57. .. warning::
  58. You can only disable logs for the whole (virtual) server not for a specific
  59. path.