From 9628e6a5298b45ceab7d9d443ba1c006b4df9313 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Micha=C5=82=20Kula?= <148193449+mkibp@users.noreply.github.com> Date: Wed, 27 Mar 2024 13:25:49 +0100 Subject: [PATCH] Bug 35812: Fix search URL aliases in Plack Apache config Mimic missing stuff from apache-shared-opac.conf into apache-shared-opac-plack.conf, where /search and /opac-search.pl aliases were missing. Note that while RewriteRule applies before reverse proxy directives and works, ScriptAlias applies purely to standard cgi perl scripts, meaning it didn't apply there. Now it's mimicked analogously to how /index.html is configured. This patch fixes an issue where someone might have just a reverse proxy to Plack configured without native Perl scripting, where this URL would then otherwise be failing. Signed-off-by: Pedro Amorim Signed-off-by: Martin Renvoize Signed-off-by: Katrin Fischer --- debian/templates/apache-shared-opac-plack.conf | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/debian/templates/apache-shared-opac-plack.conf b/debian/templates/apache-shared-opac-plack.conf index bee75e95f1..5d15a76023 100644 --- a/debian/templates/apache-shared-opac-plack.conf +++ b/debian/templates/apache-shared-opac-plack.conf @@ -14,10 +14,14 @@ RequestHeader set X-FORWARDED-PROTO "https" env=HTTPS # Point the OPAC site to Plack - ProxyPass /index.html "unix:/var/run/koha/${instance}/plack.sock|http://localhost/opac/opac-main.pl" - ProxyPassReverse /index.html "unix:/var/run/koha/${instance}/plack.sock|http://localhost/opac/opac-main.pl" ProxyPass /cgi-bin/koha "unix:/var/run/koha/${instance}/plack.sock|http://localhost/opac" ProxyPassReverse /cgi-bin/koha "unix:/var/run/koha/${instance}/plack.sock|http://localhost/opac" + ProxyPass /index.html "unix:/var/run/koha/${instance}/plack.sock|http://localhost/opac/opac-main.pl" + ProxyPassReverse /index.html "unix:/var/run/koha/${instance}/plack.sock|http://localhost/opac/opac-main.pl" + ProxyPass /search "unix:/var/run/koha/${instance}/plack.sock|http://localhost/opac/opac-search.pl" + ProxyPassReverse /search "unix:/var/run/koha/${instance}/plack.sock|http://localhost/opac/opac-search.pl" + ProxyPass /opac-search.pl "unix:/var/run/koha/${instance}/plack.sock|http://localhost/opac/opac-search.pl" + ProxyPassReverse /opac-search.pl "unix:/var/run/koha/${instance}/plack.sock|http://localhost/opac/opac-search.pl" # Point the /api endpoint to Plack RewriteCond %{REQUEST_URI} !^/api/v[0-1]+/app.pl -- 2.39.5