I have a VPS running Ubuntu 12.04.5, lsb_release -a output:

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 12.04.5 LTS
Release:        12.04
Codename:       precise

However, running

sudo apt-get install apache2

Installs apache 2.4, not apache 2.2 as I expected. The output of "apache2 -v" is:

Server version: Apache/2.4.12 (Ubuntu)
Server built:   Feb  4 2015 14:21:10

The contents of my /etc/apt/sources.list is:

deb http://archive.ubuntu.com/ubuntu precise main restricted universe
deb http://archive.ubuntu.com/ubuntu precise-updates main restricted universe
deb http://security.ubuntu.com/ubuntu precise-security main restricted universe multiverse
deb http://archive.canonical.com/ubuntu precise partner

As I understand, isn't Ubuntu 12.04 meant to use Apache 2.2? How can I get the server to install the correct version of Apache?

I had to remove http:// from the sources.list quote as I don't have enough reputation to post the links, but the http is there in the actual file.

share|improve this question
    
For future reference: by formatting sections of configurations files as code rather than blockquote you won't run into the problem of them being considered URL's – HBruijn Mar 23 '15 at 20:45
    
@HBruijn Thanks! :) – BnMcG Mar 23 '15 at 20:46
1  
Check for files in /etc/apt/sources.list.d – Michael Hampton Mar 23 '15 at 20:47
    
@MichaelHampton Thanks! I missed that! – BnMcG Mar 23 '15 at 20:48

The solution was to check in /etc/apt/sources.list.d as suggested by Michael Hampton. I had some extra sources in there.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.