Subject: DMS2.4: dms2.4_u140_a2wserver_20191204.tgz
From:    Panneer
Date:    04-12-2019
To:      Wolfgang, Daniel

DMS2.4: dms2.4_u140_a2wserver_20191204.tgz:
------------------------------------------
This update package has the fix for the AFP2web Server service are not accessible
1. TFS-254880: DMS: Consolidate AFP2web Server packages for online/batch environments
2. TFS-210847: Papyrus: Hotfix - Anlagenpaket: Drehen von externen Anlagen führt zur Verzerrung in Papyrus
3. http://v70ad095.hn.de/online/services/version 404

Tasks:
- OTS-2650: TFS-254880: Consolidate AFP2web Server release packages for online/batch env
- OTS-2522: TFS-210847: Papyrus: Hotfix - Anlagenpaket: Drehen von externen Anlagen führt zur Verzerrung in Papyrus
- OTS-2649: http://v70ad095.hn.de/online/services/version 404

Location of the hotfix:
-----------------------
    1. Hallesche FTP Server:
       /home/ftpusers/Oxseed/files/An_Hallesche/DMS2.4/dms2.4_u140_a2wserver_20191204/afp2webServer_V1.5.17_linux_x64_default.tgz
       /home/ftpusers/Oxseed/files/An_Hallesche/DMS2.4/dms2.4_u140_a2wserver_20191204/a2ws_V1.5.17_linux_x64_tenant_hallesche.tgz
       /home/ftpusers/Oxseed/files/An_Hallesche/DMS2.4/dms2.4_u140_a2wserver_20191204/dms2.4_u140_a2wserver_20191204.tgz.txt

IMPORTANT NOTES:
----------------
1. This AFP2web Server package expects in any request the "Host" header parameter to be set to "hallesche" (ie. Host=hallesche). This will be set in the NGNIX configuration as explained below.
   
2. The history.txt file will be stored into the /etc/httpd/a2wserver/tenants/hallesche/history directory. History files can be accessed using the following URL: http://<a2wserver ip>[:<port>]/services/history

Steps to deploy the fix:
------------------------
1. Stop the AFP2web Server

2. Backup existing AFP2web Server

3. Remove all files and sub directories in /etc/httpd/a2wserver/

4. Install the update packages
   a. Unpack afp2webServer_V1.5.17_linux_x64_default.tgz into the /etc/httpd/ directory
      tar xvzf afp2webServer_V1.5.17_linux_x64_default.tgz -C /etc/httpd/

   b. Unpack a2ws_V1.5.17_linux_x64_tenant_hallesche.tgz into the /etc/httpd/ directory
      tar xvzf a2ws_V1.5.17_linux_x64_tenant_hallesche.tgz -C /etc/httpd/

   c. Run the following commands to set user/user group and to assign permissions of the extracted files
      cd /etc/httpd
      chown -R apache:apache *
      chmod 777 a2wserver/tenants/default/a2wtranformation.* a2wserver/tenants/default/*.so*
      chmod 644 a2wserver/tenants/default/*.ini a2wserver/tenants/default/*.pm a2wserver/tenants/default/*.prop a2wserver/tenants/default/*.html a2wserver/tenants/default/*.txt
      chmod 777 a2wserver/tenants/hallesche/a2wtranformation.* a2wserver/tenants/hallesche/*.so*
      chmod 644 a2wserver/tenants/hallesche/*.ini a2wserver/tenants/hallesche/*.pm a2wserver/tenants/hallesche/*.prop a2wserver/tenants/hallesche/*.html a2wserver/tenants/hallesche/*.txt

5. Stop NGINX server
   /sbin/service nginx stop

6. To set the "Host" header parameter to "hallesche", add/update the following entries in the /etc/nginx/conf.d/locations.conf file
   -----------------------------------------
   location /online/services/version {
     proxy_set_header Host hallesche;
     proxy_pass http://${hallesche_env}-DMS.hn.de;
   }
   location /online/services/transform {
     proxy_set_header Host hallesche;
     proxy_pass http://${hallesche_env}-DMS.hn.de;
   }
   location /online/services/history {
     proxy_set_header Host hallesche;
     proxy_pass http://${hallesche_env}-DMS.hn.de;
   }
   location /h2wdms2/batch/services/version {
     proxy_set_header Host hallesche;
     proxy_pass http://${hallesche_env}_DMS20_Batch.hn.de;
   }
   location /h2wdms2/batch/services/transform {
     proxy_set_header Host hallesche;
     proxy_pass http://${hallesche_env}_DMS20_Batch.hn.de;
   }
   location /h2wdms2/batch/services/asyncTransform {
     proxy_set_header Host hallesche;
     proxy_pass http://${hallesche_env}_DMS20_Batch.hn.de;
   }
   location /h2wdms2/batch/services/a2wtransformation.async {
     proxy_set_header Host hallesche;
     proxy_pass http://localhost;
   }
   location /h2wdms2/batch/services/history {
     proxy_set_header Host hallesche;
     proxy_pass http://${hallesche_env}_DMS20_Batch.hn.de;
   }
   -----------------------------------------

7. Start NGINX server
   /sbin/service nginx start

8. Start the AFP2web Server

9. Stop the oxs-smartfix-server
   oxs-smartfix-server stop

10. Add the "ImagePassThrough" option to the "PDF2PDFBW" scenario in the /usr/lib/node_modules/oxs-smartfix-server/conf/OTSScenarioConf.json file as shown below
   ----------------------------------------------
   "PDF2PDFBW" : {
       "props": {
           "ImagePassThrough":            "G3,G4,Flate,LZW",
           ...
       }
   },
   ----------------------------------------------

11. Start the oxs-smartfix-server
   oxs-smartfix-server start
