How to upgrade Apache 2 from 2.2 to 2.4 for Ubuntu 10.04

  • I was in the process of doing a test upgrade from Apache 2.2 to 2.4.3. I'm using Ubuntu 10.04. I would have upgraded to 12.04 for this to see if the upgrade would go a lot smoother. Unfortunately, I was told it wasn't an option...so I'm stuck using 10.04.

    The process I did this was:

    Before attempting this, I have managed to upgrade APR from 1.3 to 1.4 and APR-UTIL since apache has said they were prerequisites beforehand: http://apr.apache.org/download.cgi. I took the apr and apr-util and placed them under httpd-2.4.3/srclib

    I have also taken Schlauberg's advise concerning libapr removal. So I removed all traces too when I removed all traces of the current apache.

    First remove all traces of the current apache:

    sudo apt-get --purge remove apache2
    sudo apt-get remove apache2-common apache2-utils apache2.2-bin apache2-common
    sudo apt-get autoremove
    
    whereis apache2
    sudo rm -Rf /etc/apache2 /usr/lib/apache2 /usr/include/apache2
    

    Afterwards, I did the following:

    sudo apt-get install build-essential
    sudo apt-get build-dep apache2
    

    Then install apache 2.4 with the following:

        wget http://www.bizdirusa.com/mirrors/apache//httpd/httpd-2.4.3.tar.gz   
    tar -xzvf httpd-2.4.3.tar.gz   
    cd        
    wget     http://mirror.olnevhost.net/pub/apache//apr/apr-1.4.6.tar.gz   
    tar -xzvf apr-1.4.6.tar.gz   
    mv apr-1.4.6 apr   
    cd   
    wget     http://mirror.olnevhost.net/pub/apache//apr/apr-util-1.4.1.tar.gz   
    tar -xzvf apr-util-1.4.1.tar.gz   
    mv apr-util-1.4.1 apr-util
    cd   
    Place folders apr and     apr-util under /httpd-2.4.3/srclib
        sudo cp -r apr-util ~/httpd-2.4.3/srclib
        sudo cp -r apr ~/httpd-2.4.3/srclib    
    cd   
    download pcre-8.31.tar.gz from http://sourceforge.net/projects/pcre/files/pcre/8.31/   
        Please note that pcre-8.31 isn't obtainable through the wget but needs to be done     manually through sourceforge.             
    tar -xzvf pcre-8.31.tar.gz && cd pcre-8.31   
    sudo ./configure   
    sudo make   
    sudo make install   
    cd   
    cd httpd-2.4.3   
    sudo ./configure --prefix=/usr/local/apache2 --enable-mods-shared=all     --enable-deflate --enable-proxy --enable-proxy-balancer --enable-proxy-http --with-mpm=prefork --with-included-apr --with-included-apr-util   
    sudo make   
    sudo make install    
    

    After this process. I no longer get an error in installation. However, I think I'm missing a step because it's not found in /etc/apache2 and if I use a command that uses apache the terminal tells me it's not installed. Can anyone tell me what I'm missing after make install.

    Thanks in advance for any help you have to offer!

    Answers(7)

    • Why are you using both svnserve and apache? You can use either, but using both is asking for trouble.

      To serve subversion over http you need mod_dav and mod_svn enabled in apache.

      • The apache logs say pretty much the same thing as the console -- That the password is incorrect. But the password are correct, that's why i modified to store them in plain text for this question. I'm at a loss on this one. Here's the apache log entry: "user jerry: authentication failure for "/svn/DataTeam": Password Mismatch" – Chad May 27 '10 at 19:13

      • Most likely you have another libapr somewhere on your system. First I uninstalled libapr that came with the system, which caused a compile error. Then I cleaned up everything except the source I found via

        locate apr
        

        Another make clean and make install fixed my problem

      • It is clear that you have DNS-related problem. You need to check the config file /etc/resolv.conf. It should contains entries like:

        nameserver your.dns1.server.ip
        nameserver your.dns2.server.ip
        

        By the way, re-installing wget has nothing to do with the problem. Also, using host command confirms this problem.

        • Since it's DAV, you'll want to check apache error logs for auth failures. Can you auth correctly with your browser?

        • I have already some IPS from leaseweb so i comment them and put google dns 8.8.8.8 and 8.8.4.4 no it work fine. Thanks a lot. – Tahola Feb 11 '12 at 12:02

        • Most likely you have another libapr somewhere on your system. First I uninstalled libapr that came with the system, which caused a compile error. Then I cleaned up everything except the source I found via

          locate apr
          

          Another make clean and make install fixed my problem