MasonSql porting to Apache 2.4

The current (2016) version of MasonSQL is compatible with Apache 2.0 and 2.2 with part of it compatible with very old version 1.3.

For several months the mod_perl module is compatible with Apache 2.4 and then we can migrate with little effort.

In the new version the 1.3 support will be removed.

Packages replacement

The package needed to be upgraded or replaced are as follows:

Linux deploying

The Debian and Ubuntu supported distributions that include the new compatible packages are:

  • Ubuntu Xenial Xerus 16.04 LTS
    • libapache2-mod-perl2 2.0.9-4ubuntu1
    • libapache2-authcookie-perl 3.24-1

  • Debian Jessie 8.6
    • libapache2-mod-perl2 2.0.9~
    • libapache2-authcookie-perl 3.22-1 Not compatible!
    • libapache2-authcookie-perl (3.26-1 - Debian Stretch & Sid ) Check compatibility!

Testings

To try and adapt the new environment we have installed a test machine:
  • masonsql-doc4 SSH 77.72.193.199:20114 with O.S. Ubuntu Xenial
  • PostgreSql 9.5
  • Apache 2.4.18-2ubuntu3.1
  • libapache2-mod-perl2 2.0.9-4ubuntu1
  • CPAN Apache::AuthCookie 3.26

Apply changes

  • "PerlSwitches -w" line was commented out because apache was throwing an error; basically mod_perl was up and running before the config file was processed, and it was too late for the flag to be specified there
  • enabled rewrite_module, ssl_module, perl_module, apreq_module and auth_form_module
  • demo_masonsql was migrated to the new machine
  • demo_masonsql.conf was migrated:
    • authorization directives were adapted => "Order allow,deny" directives were replaced with "Require all denied" syntax etc..
    • indenting was changed to conform with blocks within the file
  • ownership over /opt/demo_masonsql and /opt/masonsql directories permissions - entire demo_masonsql, and htdocs, mason, archive and report directories of /opt/masonsql; group was set to www-data

After that, apache process was able to start correctly and await connections.

Next steps

  • Remove Apache 1.3 dependencies
    • Look in code:
      • $m->APACHE2
      • $r->header_in(...)
      • $r->header_out(...)

Note: Couldn't connect to the HTTPS server because port was unreachable from outside the network.
You can use SSH tunnels like:
  • ssh -p20114 -L1443:192.168.8.233:443 user@77.72.193.199

In Depth

Topic revision: r1 - 31 Dec 2016, GuidoBrugnara
This site is powered by FoswikiCopyright (©) Leader.IT - Italy P.I. IT01434390223 Privacy policy & use of cookies