1

I'm running Ubuntu 14.04.5 and Apache 2.4.7. I want to get support for named groups and backreferences within the LocationMatch directive that is part of the (non-released) 2.4.8. It looks like I should be able to install 2.4.10, but I haven't figured out how. I've found similar questions here, but I'm not familiar enough with the versioning and APT to figure out how to get it to do what I want. How can I upgrade Apache so I can get those features? Is it something to do with the priority numbers? Is there a compelling reason not to do so?

ubuntu@server:/$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.5 LTS
Release:    14.04
Codename:   trusty
ubuntu@server:/$ apt-cache policy apache2
apache2:
  Installed: 2.4.7-1ubuntu4.20
  Candidate: 2.4.7-1ubuntu4.20
  Version table:
     2.4.10-1ubuntu1.1~ubuntu14.04.2 0
        100 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ trusty-backports/main amd64 Packages
 *** 2.4.7-1ubuntu4.20 0
        500 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
        100 /var/lib/dpkg/status
     2.4.7-1ubuntu4 0
        500 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
ubuntu@server:/$ apt-cache madison apache2
   apache2 | 2.4.10-1ubuntu1.1~ubuntu14.04.2 | http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ trusty-backports/main amd64 Packages
   apache2 | 2.4.7-1ubuntu4.20 | http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
   apache2 | 2.4.7-1ubuntu4.20 | http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
   apache2 | 2.4.7-1ubuntu4 | http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
   apache2 | 2.4.7-1ubuntu4 | http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ trusty/main Sources
   apache2 | 2.4.7-1ubuntu4.20 | http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ trusty-updates/main Sources
   apache2 | 2.4.10-1ubuntu1.1~ubuntu14.04.2 | http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ trusty-backports/main Sources
   apache2 | 2.4.7-1ubuntu4.20 | http://security.ubuntu.com/ubuntu/ trusty-security/main Sources
ubuntu@server:/$ sudo apt-get install apache2=2.4.10-1ubuntu1.1~ubuntu14.04.2
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  apache2
Suggested packages:
  apache2-doc
0 upgraded, 0 newly installed, 0 to remove and 11 not upgraded.
ubuntu@server:/$ sudo apt-get -s upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  linux-headers-generic linux-headers-virtual linux-image-virtual
  linux-virtual
The following packages will be upgraded:
  libapache2-mod-php5 php5-cli php5-common php5-gd php5-ldap php5-mysqlnd
  php5-readline
7 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
Inst php5-readline [5.5.9+dfsg-1ubuntu4.24] (5.5.9+dfsg-1ubuntu4.25 Ubuntu:14.04/trusty-updates [amd64]) []
Inst php5-cli [5.5.9+dfsg-1ubuntu4.24] (5.5.9+dfsg-1ubuntu4.25 Ubuntu:14.04/trusty-updates [amd64]) []
Inst php5-ldap [5.5.9+dfsg-1ubuntu4.24] (5.5.9+dfsg-1ubuntu4.25 Ubuntu:14.04/trusty-updates [amd64]) []
Inst libapache2-mod-php5 [5.5.9+dfsg-1ubuntu4.24] (5.5.9+dfsg-1ubuntu4.25 Ubuntu:14.04/trusty-updates [amd64]) []
Inst php5-mysqlnd [5.5.9+dfsg-1ubuntu4.24] (5.5.9+dfsg-1ubuntu4.25 Ubuntu:14.04/trusty-updates [amd64]) []
Inst php5-gd [5.5.9+dfsg-1ubuntu4.24] (5.5.9+dfsg-1ubuntu4.25 Ubuntu:14.04/trusty-updates [amd64]) []
Inst php5-common [5.5.9+dfsg-1ubuntu4.24] (5.5.9+dfsg-1ubuntu4.25 Ubuntu:14.04/trusty-updates [amd64])
Conf php5-common (5.5.9+dfsg-1ubuntu4.25 Ubuntu:14.04/trusty-updates [amd64])
Conf php5-cli (5.5.9+dfsg-1ubuntu4.25 Ubuntu:14.04/trusty-updates [amd64])
Conf php5-readline (5.5.9+dfsg-1ubuntu4.25 Ubuntu:14.04/trusty-updates [amd64])
Conf php5-ldap (5.5.9+dfsg-1ubuntu4.25 Ubuntu:14.04/trusty-updates [amd64])
Conf libapache2-mod-php5 (5.5.9+dfsg-1ubuntu4.25 Ubuntu:14.04/trusty-updates [amd64])
Conf php5-mysqlnd (5.5.9+dfsg-1ubuntu4.25 Ubuntu:14.04/trusty-updates [amd64])
Conf php5-gd (5.5.9+dfsg-1ubuntu4.25 Ubuntu:14.04/trusty-updates [amd64])
fosslinux
  • 3,831
Becca
  • 123
  • 4

2 Answers2

2

As you can see in the madison output, 2.4.10 is available in the Backports repository.

You will need to specify to install from the Backports repository with apt-get install apache2/trusty-backports among others. The tricky part here is the Backports repository is a bit unsupported in terms of bugfixes and security updates compared to the main repositories.

My first suggestion would be to upgrade to a newer version of the OS, because of the age of Trusty.

My second suggestion is install from backports with the aforementioned command. However, you may have version mismatch errors introduced if packages require the older version of Apache and aren't rebuilt for that 'newer' Apache.

Thomas Ward
  • 74,764
  • This is what I ended up doing. It was relatively harmless, since this server has been only used for minor things up until now. Thanks! – Becca May 14 '18 at 21:25
2

A solution that works for me is to add the ppa ondrej/apache2. It has version 2.4.33-1 for 14.04.

There is always some risk involved in getting software from a ppa but this one seems well respected and I've used it for several years without incident.

Note: IIRC when I first added this ppa, it set me up for a MAJOR upgrade to the apache2 version I was using at the time, and it took a while to get my sites going again.

Organic Marble
  • 23,641
  • 15
  • 70
  • 122