on master help sign in
docs: rework of chapter "Install with apache"
eb0d464Markus Heiser
docs/admin/installation-apache.rst+421−41
@@ -4,19 +4,303 @@
4Install with apache
4Install with apache
5===================
5===================
6
6
7−.. sidebar:: public to the internet?
7+.. _Apache: https://httpd.apache.org/
8−
8+.. _Apache Debian:
9− If your searx instance is public, stop here and first install :ref:`filtron
9+ https://cwiki.apache.org/confluence/display/HTTPD/DistrosDefaultLayout#DistrosDefaultLayout-Debian,Ubuntu(Apachehttpd2.x):
10− reverse proxy <filtron.sh>` and :ref:`result proxy morty <morty.sh>`, see
10+.. _README.Debian:
11− :ref:`installation scripts`.
11+ https://salsa.debian.org/apache-team/apache2/raw/master/debian/apache2.README.Debian
12+.. _Apache Arch Linux:
13+ https://wiki.archlinux.org/index.php/Apache_HTTP_Server
14+.. _Apache Fedora:
15+ https://docs.fedoraproject.org/en-US/quick-docs/getting-started-with-apache-http-server/index.html
16+.. _Apache directives:
17+ https://httpd.apache.org/docs/trunk/mod/directives.html
18+.. _Getting Started:
19+ https://httpd.apache.org/docs/current/en/getting-started.html
20+.. _Terms Used to Describe Directives:
21+ https://httpd.apache.org/docs/current/en/mod/directive-dict.html
22+.. _Configuration Files:
23+ https://httpd.apache.org/docs/current/en/configuring.html
24+.. _ProxyPreserveHost: https://httpd.apache.org/docs/trunk/mod/mod_proxy.html#proxypreservehost
25+.. _LoadModule:
26+ https://httpd.apache.org/docs/2.4/mod/mod_so.html#loadmodule
27+.. _DocumentRoot:
28+ https://httpd.apache.org/docs/trunk/mod/core.html#documentroot
29+.. _Location:
30+ https://httpd.apache.org/docs/trunk/mod/core.html#location
31+.. _uWSGI Apache support:
32+ https://uwsgi-docs.readthedocs.io/en/latest/Apache.html
33+.. _apache uwsgi:
34+ https://uwsgi-docs.readthedocs.io/en/latest/Apache.html#mod-proxy-uwsgi
35+.. _mod_proxy_uwsgi:
36+ https://uwsgi-docs.readthedocs.io/en/latest/Apache.html#mod-proxy-uwsgi
37+
38+.. sidebar:: further read
39+
40+ - `Apache Arch Linux`_
41+ - `Apache Debian`_ and `README.Debian`_
42+ - `Apache Fedora`_
43+ - `Apache directives`_
12
44
13.. contents:: Contents
45.. contents:: Contents
14 :depth: 2
46 :depth: 2
15 :local:
47 :local:
16 :backlinks: entry
48 :backlinks: entry
17
49
18−Add wsgi mod
50+The apache HTTP server
19−============
51+======================
52+
53+If Apache_ is not installed, install it now. If apache_ is new to you, the
54+`Getting Started`_, `Configuration Files`_ and `Terms Used to Describe
55+Directives`_ documentation gives first orientation. There is also a list of
56+`Apache directives`_ *to keep in the pocket*.
57+
58+.. tabs::
59+
60+ .. group-tab:: Ubuntu / debian
61+
62+ .. code:: sh
63+
64+ sudo -H apt-get install apache2
65+
66+ .. group-tab:: Arch Linux
67+
68+ .. code:: sh
69+
70+ sudo -H pacman -S apache
71+ sudo -H systemctl enable httpd
72+ sudo -H systemctl start http
73+
74+ .. group-tab:: Fedora / RHEL
75+
76+ .. code:: sh
77+
78+ sudo -H dnf install httpd
79+ sudo -H systemctl enable httpd
80+ sudo -H systemctl start httpd
81+
82+Now at http://localhost you should see any kind of *Welcome* or *Test* page.
83+How this default intro site is configured, depends on the linux distribution
84+(compare `Apache directives`_).
85+
86+.. tabs::
87+
88+ .. group-tab:: Ubuntu / debian
89+
90+ .. code:: sh
91+
92+ less /etc/apache2/sites-enabled/000-default.conf
93+
94+ In this file, there is a line setting the `DocumentRoot`_ directive:
95+
96+ .. code:: apache
97+
98+ DocumentRoot /var/www/html
99+
100+ And the *welcome* page is the HTML file at ``/var/www/html/index.html``.
101+
102+ .. group-tab:: Arch Linux
103+
104+ .. code:: sh
105+
106+ less /etc/httpd/conf/httpd.conf
107+
108+ In this file, there is a line setting the `DocumentRoot`_ directive:
109+
110+ .. code:: apache
111+
112+ DocumentRoot "/srv/http"
113+ <Directory "/srv/http">
114+ Options Indexes FollowSymLinks
115+ AllowOverride None
116+ Require all granted
117+ </Directory>
118+
119+ The *welcome* page of Arch Linux is a page showing directory located at
120+ ``DocumentRoot``. This is *directory* page is generated by the Module
121+ `mod_autoindex <https://httpd.apache.org/docs/2.4/mod/mod_autoindex.html>`_:
122+
123+ .. code:: apache
124+
125+ LoadModule autoindex_module modules/mod_autoindex.so
126+ ...
127+ Include conf/extra/httpd-autoindex.conf
128+
129+ .. group-tab:: Fedora / RHEL
130+
131+ .. code:: sh
132+
133+ less /etc/httpd/conf/httpd.conf
134+
135+ In this file, there is a line setting the ``DocumentRoot`` directive:
136+
137+ .. code:: apache
138+
139+ DocumentRoot "/var/www/html"
140+ ...
141+ <Directory "/var/www">
142+ AllowOverride None
143+ # Allow open access:
144+ Require all granted
145+ </Directory>
146+
147+ On fresh installations, the ``/var/www`` is empty and the *default
148+ welcome page* is shown, the configuration is located at::
149+
150+ less /etc/httpd/conf.d/welcome.conf
151+
152+.. _The Debian Layout:
153+
154+The Debian Layout
155+=================
156+
157+Be aware that the Debian layout is quite different from the standard Apache
158+configuration. For details look at the README.Debian_
159+(``/usr/share/doc/apache2/README.Debian.gz``). Some commands you should know on
160+Debian:
161+
162+* :man:`apache2ctl`: Apache HTTP server control interface
163+* :man:`a2enmod`, :man:`a2dismod`: switch on/off modules
164+* :man:`a2enconf`, :man:`a2disconf`: switch on/off configurations
165+* :man:`a2ensite`, :man:`a2dissite`: switch on/off sites
166+
167+
168+.. _apache searx site:
169+
170+Apache Reverse Proxy
171+====================
172+
173+.. sidebar:: public to the internet?
174+
175+ If your searx instance is public, stop here and first install :ref:`filtron
176+ reverse proxy <filtron.sh>` and :ref:`result proxy morty <morty.sh>`, see
177+ :ref:`installation scripts`. If already done, follow setup: *searx via
178+ filtron plus morty*.
179+
180+To setup a Apache revers proxy you have to enable the *headers* and *proxy*
181+modules and create a `Location`_ configuration for the searx site. In most
182+distributions you have to uncomment the lines in the main configuration file,
183+except in the :ref:`The Debian Layout`.
184+
185+.. tabs::
186+
187+ .. group-tab:: Ubuntu / debian
188+
189+ In the Apache setup, enable headers and proxy modules:
190+
191+ .. code:: sh
192+
193+ sudo -H a2enmod headers
194+ sudo -H a2enmod proxy
195+ sudo -H a2enmod proxy_http
196+
197+ In :ref:`The Debian Layout` you create a ``searx.conf`` with the
198+ ``<Location /searx >`` directive and save this file in the *sites
199+ available* folder at ``/etc/apache2/sites-available``. To enable the
200+ ``searx.conf`` use :man:`a2ensite`:
201+
202+ .. code:: sh
203+
204+ sudo -H a2ensite searx.conf
205+
206+ .. group-tab:: Arch Linux
207+
208+ In the ``/etc/httpd/conf/httpd.conf`` file, activate headers and proxy
209+ modules (LoadModule_):
210+
211+ .. code:: apache
212+
213+ LoadModule headers_module modules/mod_headers.so
214+ LoadModule proxy_module modules/mod_proxy.so
215+ LoadModule proxy_http_module modules/mod_proxy_http.so
216+
217+ .. group-tab:: Fedora / RHEL
218+
219+ In the ``/etc/httpd/conf/httpd.conf`` file, activate headers and proxy
220+ modules (LoadModule_):
221+
222+ .. code:: apache
223+
224+ LoadModule headers_module modules/mod_headers.so
225+ LoadModule proxy_module modules/mod_proxy.so
226+ LoadModule proxy_http_module modules/mod_proxy_http.so
227+
228+.. tabs::
229+
230+ .. group-tab:: searx via filtron plus morty
231+
232+ Use this setup, if your instance is public to the internet, compare
233+ figure: :ref:`architecture <arch public>` and :ref:`installation scripts`.
234+
235+ 1. Configure a reverse proxy for :ref:`filtron <filtron.sh>`, listening on
236+ *localhost 4004* (:ref:`filtron route request`):
237+
238+ .. code:: apache
239+
240+ <Location /searx >
241+
242+ # SetEnvIf Request_URI "/searx" dontlog
243+ # CustomLog /dev/null combined env=dontlog
244+
245+ Require all granted
246+
247+ Order deny,allow
248+ Deny from all
249+ #Allow from fd00::/8 192.168.0.0/16 fe80::/10 127.0.0.0/8 ::1
250+ Allow from all
251+
252+ ProxyPreserveHost On
253+ ProxyPass http://127.0.0.1:4004
254+ RequestHeader set X-Script-Name /searx
255+
256+ </Location>
257+
258+ 2. Configure reverse proxy for :ref:`morty <searx morty>`, listening on
259+ *localhost 3000* (FYI: ``ProxyPreserveHost On`` is already set, see
260+ above):
261+
262+ .. code:: apache
263+
264+ ProxyPreserveHost On
265+
266+ <Location /morty >
267+
268+ # SetEnvIf Request_URI "/morty" dontlog
269+ # CustomLog /dev/null combined env=dontlog
270+
271+ Require all granted
272+
273+ Order deny,allow
274+ Deny from all
275+ #Allow from fd00::/8 192.168.0.0/16 fe80::/10 127.0.0.0/8 ::1
276+ Allow from all
277+
278+ ProxyPass http://127.0.0.1:3000
279+ RequestHeader set X-Script-Name /morty
280+
281+ </Location>
282+
283+ Note that reverse proxy advised to be used in case of single-user or
284+ low-traffic instances. For a fully result proxification add :ref:`morty's
285+ <searx morty>` **public URL** to your :origin:`searx/settings.yml`:
286+
287+ .. code:: yaml
288+
289+ result_proxy:
290+ # replace example.org with your server's public name
291+ url : https://example.org/morty
292+
293+ server:
294+ image_proxy : True
295+
296+uWSGI support
297+=============
298+
299+Be warned, with this setup, your instance isn't :ref:`protected <searx
300+filtron>`. Nevertheless it is good enough for intranet usage and it
301+demonstrates: *how different the uwsgi support is, depending on the
302+distribution*. To enable :ref:`uWSGI <searx uwsgi>` support you need to install
303+the apache `apache uwsgi`_ support:
20
304
21.. tabs::
305.. tabs::
22
306
@@ -27,59 +311,130 @@ Add wsgi mod
27 sudo -H apt-get install libapache2-mod-uwsgi
311 sudo -H apt-get install libapache2-mod-uwsgi
28 sudo -H a2enmod uwsgi
312 sudo -H a2enmod uwsgi
29
313
30−Add this configuration in the file ``/etc/apache2/apache2.conf``. To limit
314+ .. group-tab:: Arch Linux
31−acces to your intranet replace ``Allow from all`` directive and replace
315+
32−``192.168.0.0/16`` with your subnet IP/class.
316+ .. code:: sh
317+
318+ sudo -H pacman -S uwsgi
33
319
34−.. _inranet apache site:
320+ In the ``/etc/httpd/conf/httpd.conf`` file, activate headers and proxy
321+ modules (LoadModule_):
35
322
36−Note that if your instance of searx is not at the root, you should change
323+ .. code:: apache
37−``<Location />`` by the location of your instance, like ``<Location /searx>``:
38
324
39−.. code:: apache
325+ LoadModule proxy_module modules/mod_proxy.so
326+ LoadModule proxy_uwsgi_module modules/mod_proxy_uwsgi.so
40
327
41− # CustomLog /dev/null combined
328+ .. group-tab:: Fedora / RHEL
42
329
43− <IfModule mod_uwsgi.c>
330+ .. code:: sh
44
331
45− <Location />
332+ sudo -H dnf install uwsgi
333+ FIXME: enable uwsgi in apache
46
334
47− Options FollowSymLinks Indexes
335+The next example shows a configuration using the `uWSGI Apache support`_ via
48− SetHandler uwsgi-handler
336+unix sockets. For socket communication, you have to activate ``socket =
49− uWSGISocket /run/uwsgi/app/searx/socket
337+/run/uwsgi/app/searx/socket`` and comment out the ``http = 127.0.0.1:8888``
338+configuration in your :ref:`uwsgi ini file <uwsgi configuration>`.
50
339
51− Order deny,allow
340+If not already exists, create a folder for the unix sockets, which can be
52− Deny from all
341+used by the searx account:
53− # Allow from fd00::/8 192.168.0.0/16 fe80::/10 127.0.0.0/8 ::1
54− Allow from all
55
342
56− </Location>
343+.. code:: bash
57
344
58− </IfModule>
345+ sudo -H mkdir -p /run/uwsgi/app/searx/
346+ sudo -H chown -R searx:searx /run/uwsgi/app/searx/
59
347
60−Enable apache mod_uwsgi and restart apache:
348+To limit acces to your intranet replace ``Allow from all`` directive and replace
349+``192.168.0.0/16`` with your subnet IP/class.
61
350
62.. tabs::
351.. tabs::
63
352
64 .. group-tab:: Ubuntu / debian
353 .. group-tab:: Ubuntu / debian
65
354
66− .. code:: sh
355+ Debian uses the (old) `mod_uwsgi
356+ <https://uwsgi-docs.readthedocs.io/en/latest/Apache.html#mod-uwsgi>`_.
67
357
68− a2enmod uwsgi
358+ .. code:: apache
69− sudo -H systemctl restart apache2
70
359
71−disable logs
360+ <IfModule mod_uwsgi.c>
72−============
361+
362+ # SetEnvIf Request_URI "/searx" dontlog
363+ # CustomLog /dev/null combined env=dontlog
364+
365+ <Location /searx >
366+
367+ Require all granted
368+
369+ Options FollowSymLinks Indexes
370+ SetHandler uwsgi-handler
371+ uWSGISocket /run/uwsgi/app/searx/socket
372+
373+ Order deny,allow
374+ Deny from all
375+ # Allow from fd00::/8 192.168.0.0/16 fe80::/10 127.0.0.0/8 ::1
376+ Allow from all
377+
378+ </Location>
379+
380+ </IfModule>
381+
382+ .. group-tab:: Arch Linux
383+
384+ Arch Linux uses the (recommend) `mod_proxy_uwsgi`_.
385+
386+ .. code:: apache
387+
388+ <IfModule proxy_uwsgi_module>
389+
390+ # SetEnvIf Request_URI /searx dontlog
391+ # CustomLog /dev/null combined env=dontlog
392+
393+ <Location /searx>
394+
395+ Require all granted
396+ Order deny,allow
397+ Deny from all
398+ # Allow from fd00::/8 192.168.0.0/16 fe80::/10 127.0.0.0/8 ::1
399+ Allow from all
400+
401+ ProxyPreserveHost On
402+ ProxyPass unix:/run/uwsgi/app/searx/socket|uwsgi://uwsgi-uds-searx/
403+
404+ </Location>
405+
406+ </IfModule>
407+
408+ .. group-tab:: Fedora / RHEL
409+
410+ RHEL uses the (recommend) `mod_proxy_uwsgi`_.
73
411
74−For better privacy you can disable Apache logs. Go back to
412+ .. code:: apache
75−``/etc/apache2/apache2.conf`` :ref:`[example] <inranet apache site>` and above
76−``<Location />`` activate directive:
77
413
78−.. code:: apache
414+ <IfModule proxy_uwsgi_module>
79
415
416+ # SetEnvIf Request_URI /searx dontlog
80− CustomLog /dev/null combined
417+ # CustomLog /dev/null combined env=dontlog
81
418
419+ <Location /searx>
420+
421+ Require all granted
422+ Order deny,allow
423+ Deny from all
424+ # Allow from fd00::/8 192.168.0.0/16 fe80::/10 127.0.0.0/8 ::1
425+ Allow from all
426+
427+ ProxyPreserveHost On
428+ ProxyPass unix:/run/uwsgi/app/searx/socket|uwsgi://uwsgi-uds-searx/
429+
430+ </Location>
431+
432+ </IfModule>
433+
82−Restart apache:
434+.. _restart apache:
435+
436+Restart service
437+===============
83
438
84.. tabs::
439.. tabs::
85
440
@@ -88,8 +443,33 @@ Restart apache:
88 .. code:: sh
443 .. code:: sh
89
444
90 sudo -H systemctl restart apache2
445 sudo -H systemctl restart apache2
446+ sudo -H service uwsgi restart searx
447+
448+ .. group-tab:: Arch Linux
449+
450+ .. code:: sh
451+
452+ sudo -H systemctl restart httpd
453+ sudo -H systemctl restart uwsgi@searx
454+
455+ .. group-tab:: Fedora / RHEL
456+
457+ .. code:: sh
458+
459+ sudo -H systemctl restart httpd
460+ sudo -H touch /etc/uwsgi.d/searx.ini
461+
462+
463+disable logs
464+============
465+
466+For better privacy you can disable Apache logs. In the examples above activate
467+one of the lines and `restart apache`_::
468+
91
469
92−.. warning::
470+ # SetEnvIf Request_URI "/searx" dontlog
471+ # CustomLog /dev/null combined env=dontlog
93
472
94− You can only disable logs for the whole (virtual) server not for a specific
473+The ``CustomLog`` directive disable logs for the whole (virtual) server, use it
95− path.
474+when the URL of the service does not have a path component (``/searx``) / is
475+located at root (``/``).
docs/admin/installation-nginx.rst+16−11
@@ -28,10 +28,9 @@ Install with nginx
28The nginx HTTP server
28The nginx HTTP server
29=====================
29=====================
30
30
31−If nginx_ is not installed (uwsgi will not work with the package nginx-light)
31+If nginx_ is not installed (uwsgi will not work with the package nginx-light),
32install it now.
32install it now.
33
33
34−
35.. tabs::
34.. tabs::
36
35
37 .. group-tab:: Ubuntu / debian
36 .. group-tab:: Ubuntu / debian
@@ -58,7 +57,8 @@ install it now.
58
57
59Now at http://localhost you should see a *Welcome to nginx!* page, on Fedora you
58Now at http://localhost you should see a *Welcome to nginx!* page, on Fedora you
60see a *Fedora Webserver - Test Page*. The test page comes from the default
59see a *Fedora Webserver - Test Page*. The test page comes from the default
61−`nginx server configuration`_:
60+`nginx server configuration`_. How this default intro site is configured,
61+depends on the linux distribution:
62
62
63.. tabs::
63.. tabs::
64
64
@@ -111,7 +111,8 @@ A nginx searx site
111
111
112 If your searx instance is public, stop here and first install :ref:`filtron
112 If your searx instance is public, stop here and first install :ref:`filtron
113 reverse proxy <filtron.sh>` and :ref:`result proxy morty <morty.sh>`, see
113 reverse proxy <filtron.sh>` and :ref:`result proxy morty <morty.sh>`, see
114− :ref:`installation scripts`.
114+ :ref:`installation scripts`. If already done, follow setup: *searx via
115+ filtron plus morty*.
115
116
116Now you have to create a configuration for the searx site. If nginx_ is new to
117Now you have to create a configuration for the searx site. If nginx_ is new to
117you, the `nginx beginners guide`_ is a good starting point and the `Getting
118you, the `nginx beginners guide`_ is a good starting point and the `Getting
@@ -143,9 +144,10 @@ Started wiki`_ is always a good resource *to keep in the pocket*.
143 .. group-tab:: searx via filtron plus morty
144 .. group-tab:: searx via filtron plus morty
144
145
145 Use this setup, if your instance is public to the internet, compare
146 Use this setup, if your instance is public to the internet, compare
146− figure: :ref:`architecture <arch public>`. Configure a reverse proxy for
147+ figure: :ref:`architecture <arch public>` and :ref:`installation scripts`.
148+
147− :ref:`filtron <filtron.sh>`, listening on *localhost 4004* (:ref:`filtron
149+ 1. Configure a reverse proxy for :ref:`filtron <filtron.sh>`, listening on
148− route request`):
150+ *localhost 4004* (:ref:`filtron route request`):
149
151
150 .. code:: nginx
152 .. code:: nginx
151
153
@@ -159,8 +161,8 @@ Started wiki`_ is always a good resource *to keep in the pocket*.
159 }
161 }
160
162
161
163
162− Configure reverse proxy for :ref:`morty <searx morty>`, listening on
164+ 2. Configure reverse proxy for :ref:`morty <searx morty>`, listening on
163− *localhost 3000*:
165+ *localhost 3000*:
164
166
165 .. code:: nginx
167 .. code:: nginx
166
168
@@ -181,7 +183,10 @@ Started wiki`_ is always a good resource *to keep in the pocket*.
181
183
182 result_proxy:
184 result_proxy:
183 # replace example.org with your server's public name
185 # replace example.org with your server's public name
184− url : https://example.org/
186+ url : https://example.org/morty
187+
188+ server:
189+ image_proxy : True
185
190
186
191
187 .. group-tab:: proxy or uWSGI
192 .. group-tab:: proxy or uWSGI
@@ -244,7 +249,7 @@ Started wiki`_ is always a good resource *to keep in the pocket*.
244 mkdir -p /run/uwsgi/app/searx/
249 mkdir -p /run/uwsgi/app/searx/
245 sudo -H chown -R searx:searx /run/uwsgi/app/searx/
250 sudo -H chown -R searx:searx /run/uwsgi/app/searx/
246
251
247− .. group-tab:: subdirectory URL
252+ .. group-tab:: proxy at subdir URL
248
253
249 Be warned, with these setups, your instance isn't :ref:`protected <searx
254 Be warned, with these setups, your instance isn't :ref:`protected <searx
250 filtron>`. The examples are just here to demonstrate how to export the
255 filtron>`. The examples are just here to demonstrate how to export the
docs/admin/installation.rst+6
@@ -54,3 +54,9 @@ This installs searx as described in :ref:`installation basic`.
54.. code:: bash
54.. code:: bash
55
55
56 $ sudo -H ./utils/morty.sh install all
56 $ sudo -H ./utils/morty.sh install all
57+
58+If all services are running fine, you can add it to your HTTP server:
59+
60+- :ref:`installation apache`
61+- :ref:`installation nginx`
62+
utils/lib.sh+9−3
@@ -634,9 +634,15 @@ if [[ -z "${APACHE_SITES_AVAILABE}" ]]; then
634fi
634fi
635
635
636apache_is_installed() {
636apache_is_installed() {
637+ case $DIST_ID-$DIST_VERS in
638+ ubuntu-*|debian-*)
637− (command -v apachectl \
639+ (command -v apachectl \
638− && command -v a2ensite \
640+ && command -v a2ensite \
639− && command -v a2dissite ) &>/dev/null
641+ && command -v a2dissite ) &>/dev/null
642+ ;;
643+ arch) (command -v httpd) ;;
644+ fedora) (command -v httpd) ;;
645+ esac
640}
646}
641
647
642apache_reload() {
648apache_reload() {
utils/searx.sh+5
@@ -735,6 +735,11 @@ This installs the searx uwsgi app as apache site. If your server is public to
735the internet, you should instead use a reverse proxy (filtron) to block
735the internet, you should instead use a reverse proxy (filtron) to block
736excessively bot queries."
736excessively bot queries."
737
737
738+ case $DIST_ID-$DIST_VERS in
739+ ubuntu-*|debian-*) : ;;
740+ *) err_msg "sorry distro $DIST_ID $DIST_VERS not yet supported"; exit 42 ;;
741+ esac
742+
738 ! apache_is_installed && err_msg "Apache is not installed."
743 ! apache_is_installed && err_msg "Apache is not installed."
739
744
740 if ! ask_yn "Do you really want to install apache site for searx-uwsgi?"; then
745 if ! ask_yn "Do you really want to install apache site for searx-uwsgi?"; then
utils/templates/etc/apache2/sites-available/morty.conf+2−2
@@ -18,8 +18,8 @@ ProxyPreserveHost On
18 ProxyPass http://${MORTY_LISTEN}
18 ProxyPass http://${MORTY_LISTEN}
19 RequestHeader set X-Script-Name ${PUBLIC_URL_PATH_MORTY}
19 RequestHeader set X-Script-Name ${PUBLIC_URL_PATH_MORTY}
20
20
21− # In Apache it seems, that setting HTTP_HOST header direct here does have no
21+ # In Apache it seems, that setting HTTP_HOST header directive here does have
22− # effect. I needed to set 'ProxyPreserveHost On' (see above).
22+ # no effect. I needed to set 'ProxyPreserveHost On' (see above).
23
23
24 # RequestHeader set Host ${PUBLIC_HOST}
24 # RequestHeader set Host ${PUBLIC_HOST}
25
25
utils/templates/etc/apache2/sites-available/searx.conf:filtron+2−2
@@ -23,8 +23,8 @@ ProxyPreserveHost On
23 ProxyPass http://${FILTRON_LISTEN}
23 ProxyPass http://${FILTRON_LISTEN}
24 RequestHeader set X-Script-Name ${FILTRON_URL_PATH}
24 RequestHeader set X-Script-Name ${FILTRON_URL_PATH}
25
25
26− # In Apache it seems, that setting HTTP_HOST header direct here does have no
26+ # In Apache it seems, that setting HTTP_HOST header directive here does have
27− # effect. I needed to set 'ProxyPreserveHost On' (see above). HTTP_HOST
27+ # no effect. I needed to set 'ProxyPreserveHost On' (see above). HTTP_HOST
28 # (ProxyPreserveHost On) is needed by searx to render correct *Search URL*
28 # (ProxyPreserveHost On) is needed by searx to render correct *Search URL*
29 # in the *Link* box and *saved preference*.
29 # in the *Link* box and *saved preference*.
30
30