Need to Downgrade Apache to 2.4.18 - 2.4.26

nemonoman

Verified User
Joined
Apr 7, 2007
Messages
26
With Apache Version 2.4.27 apache changed how it handled symlinks.

I have 5 servers running DA and Apache 2.4.18 and all is well.

When I built a new server, all my programs broke. DA support tells me this is because my extensive use of a novel file structure based on symlinks is not supported by Apache 2.4.27+. DA now defaults to 2.4.38

I followed instructions here
https://help.directadmin.com/item.php?id=565
to request 2.4.18 apache downgrade.

Following instructions: echo "apache:2.4.18:" > custom_versions.txt
[root@Smexy5 custombuild]# ./build apache

THE BUILD SHOWED THIS
Found /usr/local/directadmin/custombuild/httpd-2.4.38.tar.gz << DA DID NOT DOWNLOAD 2.4.18

AND THIS
Patching apache for hardened symlinks patch... << Which is what is causing the problem

After this build of requested Apache 2.4.18, did apachectl -v:
ACTUAL installed version was 2.4.38

It appears that DA is simply not allowing for Apache Downgrades anymore?
How can I downgrade to 2.4.18 if using DA?
 
Alex -- :THANKS: That's the best info I've had in days!

Before I make assumptions -- Where does that get written? /usr/local/directadmin/custombuild/custom_versions.txt ??

Boy, I hope this works. It would be a life saver!

Nemo
 
It should be found with a 'yes' value in /usr/local/directadmin/custombuild/options.conf if you have custombuild version 2.x
 
Final Answer

With help from DA tech support I got the results I wanted.

DO NOT just blindly use https://help.directadmin.com/item.php?id=565 !!!

The actual method for the apache downgrade is:
Code:
cd /usr/local/directadmin/custombuild/
 echo "apache2.4:2.4.18:" > custom_versions.txt;

For the symlinks question (if like me, you want your symlinks to work the old fashioned, unhardened way)

Before the build
Code:
nano /usr/local/directadmin/custombuild/options.conf
Find the line
Code:
harden_symlinks_patch=yes
change to
Code:
harden_symlinks_patch=no

Once changes have been made:
Code:
cd /usr/local/directadmin/custombuild/
./build apache

Thanks to Alex for the tip on harden_symlinks_patch=no
and thanks to Martynas at DA the echo "apache2.4:2.4.18:" tip.

Nemo

PS: This is NOT guaranteed to work. See unresolved problems here:
https://forum.directadmin.com/showthread.php?t=57657
 
Last edited:
You're welcome. I believe Apache/2.4.38 should be fine too with harden_symlinks_patch=no
At least one of my customers has Apache/2.4.38+harden_symlinks_patch=no working fine. Probably it will work for you too.
 
Probably you have multiple apache binaries on your server and apachectl/httpd relate to different installation. Check their time of last modifications, they should match.

Never got any complain from this setup from my customer, so I don't have any idea on what else might wrong on your side.
 
Back
Top