Bug 15218: (Plack) Make processes that rely on background jobs run in CGI mode
authorTomas Cohen Arazi <tomascohen@theke.io>
Fri, 20 Nov 2015 03:08:45 +0000 (00:08 -0300)
committerTomas Cohen Arazi <tomascohen@theke.io>
Fri, 20 Nov 2015 14:20:35 +0000 (11:20 -0300)
This patch adds an entry to the plack-related apache configuration so the
problematic scripts (that fail under plack/starman) are not processed through
Plack but in CGI mode instead.

To test:
- Follow the setup steps from bug 15032
- Add the line from this patch to /etc/koha/apache-shared-intranet-plack.conf
 (if you are on kohadevbox you should probably change the filesystem path to
  /home/vagrant/kohaclone/tools/background-job-process.pl)
- Do the full import process of MARC data.
=> SUCCESS: It works as expected.
- Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
debian/templates/apache-shared-intranet-plack.conf

index 65a34a2..8dcc53a 100644 (file)
@@ -5,10 +5,20 @@
 # /etc/apache2/site-available file, from within the VirtualHost section
 # for the intranet.
 
-# Plack is only available out-of-the-box for Apache 2.4.7+ setups
+# Plack is only available out-of-the-box for Apache 2.4.8+ setups
 <IfVersion >= 2.4.8>
     <IfModule mod_proxy_http.c>
 
+        # FIXME: This scripts should be fixed so they
+        # don't break under plack/starman
+        ProxyPass "/cgi-bin/koha/offline_circ/process_koc.pl" "!"
+        ProxyPass "/cgi-bin/koha/tools/background-job-progress.pl" "!"
+        ProxyPass "/cgi-bin/koha/tools/batch_record_modification.pl" "!"
+        ProxyPass "/cgi-bin/koha/tools/batchMod.pl" "!"
+        ProxyPass "/cgi-bin/koha/tools/manage-marc-import.pl" "!"
+        ProxyPass "/cgi-bin/koha/tools/stage-marc-import.pl" "!"
+        ProxyPass "/cgi-bin/koha/tools/upload-cover-image.pl" "!"
+
         ProxyPreserveHost On
 
        # RequestHeader set X-FORWARDED-PROTO "https"