searx: Update outdated Apache configuration

- Avoid Satisfy and Allow which are deprecated.

- Make sure the redirection rule applies only to the URL intended.

- Fix issue with Proxy matching of URLs.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa 2018-12-21 14:12:08 -08:00 committed by James Valleroy
parent 6afbd0d9fc
commit 5076488c7f
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808

View File

@ -1,14 +1,5 @@
# This exclusion rule is to allow Searx to be added as a search engine in Firefox.
<LocationMatch "^/searx/(opensearch.xml|static/themes/oscar/img/favicon.png)$">
Satisfy Any
Allow from all
AuthType None
ProxyPass unix:/run/uwsgi/app/searx/socket|uwsgi://uwsgi-uds-searx/
</LocationMatch>
# Redirect /searx to /searx/
<Location /searx>
<Location ~ ^/searx$>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/searx$
@ -26,3 +17,10 @@
ProxyPass unix:/run/uwsgi/app/searx/socket|uwsgi://uwsgi-uds-searx/
</Location>
# This exclusion rule is to allow Searx to be added as a search engine in Firefox.
<LocationMatch "^/searx/(opensearch.xml|static/themes/oscar/img/favicon.png)$">
Require all granted
ProxyPassMatch "unix:/run/uwsgi/app/searx/socket|uwsgi://uwsgi-uds-searx/$1"
</LocationMatch>