Apache2 and Perl tips upgrading from Wheezy to Jessie

Share your own howto's etc. Not for support questions!

Apache2 and Perl tips upgrading from Wheezy to Jessie

Postby waldo22 » 2015-10-15 20:56

When upgrading from Wheezy to Jessie last night, things went pretty smoothly, with the following exceptions.

Apache2 no longer loaded any of my vhosts. Since at least Lenny, vhosts in /etc/apache2/sites-available/ could be named anything.
In Apache 2.4 the vhost "include" in /etc/apache2/apache2.conf was changed from:
Code: Select all
# Include the virtual host configurations:
IncludeOptional sites-enabled/*

Code: Select all
# Include the virtual host configurations:
IncludeOptional sites-enabled/*.conf

This causes vhosts in /etc/apache2/sites-available/ to not load unless they end with a .conf extension.

Trying to enable using a2ensite filename gives a "not found" error.

The solution to this is to either rename all conf files in /etc/apache2/sites-available/ with a .conf extension, or change /etc/apache2/apache2.conf to remove the ".conf" from IncludeOptional sites-enabled/

Another issue is that Apache 2.4 vhost conf files no longer accept directory options with a mixture of + and nothing. I had:
Code: Select all
Options Indexes MultiViews FollowSymLinks +ExecCGI
but had to remove the "+" to get Apache to reload. You have to either use all +/- or nothing at all.

In addition to the Apache2 problems, Perl > 5.14 (I think) now spams my error logs with warnings.
CGI.pm spams the Apache error log with
Code: Select all
CGI::param called in list context from package main line 40, this can lead to vulnerabilities.
when you access a CGI parameter thusly:
Code: Select all
my $formInput = param('inputName');

This requires either adding the word "scalar" before param('inputName') like
Code: Select all
my $formInput = scalar param('inputName');

or setting
Code: Select all
in /usr/share/perl5/CGI.pm

Perl also now warns
Code: Select all
AH01215: push on reference is experimental
when pushing a scalar into an array like so:
Code: Select all

It still works, but to make the warnings stop you have to use the following syntax:
Code: Select all
This is probably a good thing, since this is the proper syntax anyway.

Some Perl modules installed from CPAN don't seem to make the upgrade.
I had to re-install Net::APNS (for Apple Push notifications; libnet-apns-perl seems to be un-maintained since ~2010?) and WWW::Google::Cloud::Messaging for Android push.
Unfortunately there are no Debian packages for these modules.

Finally, a really cool package for using Webkit to make PDFs (WKHTMLtoPDF) doesn't seem to work with version 0.12.1 in the Jessie repository. Installing the stable .deb from the project homepage fixes the issue.

I know some of these things are esoteric and specific to my oddball use cases (or my poor Perl style), but the 2 Apache conf issues and the CGI.pm warnings probably show up for a lot of people, so hopefully this will help someone.

Posts: 17
Joined: 2012-06-19 00:09

Return to Docs, Howtos, Tips & Tricks

Who is online

Users browsing this forum: BradleyGuerr and 5 guests