Because of Ubuntu updating, I made the mistake to upgrade Apache 2.2 to 2.4—many things went wrong.
I have no idea how to specify the version after
apt-get remove apache2.
apt-get install apache2 always installs 2.4.
How can I do it?
You need to do the following:
The above command will display list of available versions for this package. Then select the needed version and do the following.
See the ubuntu howto on package pinning:
The 'preferences' file is where the actual pinning takes place. To pin a package, set its Pin-Priority to higher number. Here's an example:
Test before running
You upgraded from Ubuntu 13.04 to 13.10? There is no way to get Apache 2.2 back without going outside the Ubuntu package repositories. It's better to just fix your Apache configuration so that it works with 2.4.