Author Topic: Apache rebuild doesn't work (again) and workaround  (Read 662 times)

0 Members and 1 Guest are viewing this topic.

Apache rebuild doesn't work (again) and workaround
« on: May 24, 2023, 07:25:38 PM »
When I try to recompile apache, the log says

Nothing to do
Apache Rebuild Completed
But apache is not compiled.

The url apachesource="$version.tar.gz" is broken.

Workaround is replace this url in the file generated from CWP GUI when you try to recompile /usr/local/src/
In line 9 replace
 with this:

Now apache is compiled with the new modules but fails to start:
Syntax error on line 9 of /usr/local/apache/conf.d/mod_security.conf: Cannot load modules/ into server: /usr/local/apache/modules/ undefined symbol: apr_crypto_block_cleanup

I solved follow the guide of user warwicknz in this forum:
- Install modsecurity through CWP GUI so it generates the main config and OWASP rules

- Then reinstall mod_security2 manually to overwrite the issue with

#Download ModSecurity

#Config checksum of download
sha256sum -c modsecurity-2.9.1.tar.gz.sha256

#Install ModSecurity:
tar -xvf modsecurity-2.9.1.tar.gz
cd modsecurity-2.9.1
./configure --with-apxs=/usr/local/apache/bin/apxs
sudo make install
cp /usr/local/modsecurity/lib/ /usr/local/apache/modules

Restart Apache, fixed!
I hope itís useful until they fix it

Re: Apache rebuild doesn't work (again) and workaround
« Reply #1 on: May 26, 2023, 10:43:28 PM »
What version of Apache are you looking for? 2.4.56?

As a quick test, I can curl their older Apache 2.2.27 script:
Code: [Select]
curl -O

Re: Apache rebuild doesn't work (again) and workaround
« Reply #2 on: June 21, 2023, 03:36:38 AM »
check disk space i had this issue before, was because my server was full, then i rebooted the server after a failed build and couldnt get access to cwp