Control Web Panel
WebPanel => CentOS 9 Problems => Topic started by: mbuchholz on June 25, 2024, 08:51:16 PM
-
For some reason when you install mod_security the config file for it has an extra line:
LoadFile /usr/lib64/
Which errors out Apache when loading:
httpd: Syntax error on line 512 of /usr/local/apache/conf/httpd.conf: Syntax error on line 2 of /usr/local/apache/conf.d/mod_security.conf: Cannot load /usr/lib64/ into server: /usr/lib64/: cannot read file data: Is a directory
Removing that line makes it load fine. Not sure if another file was supposed to be loaded by that line.
Currently testing CWP on Alma Linux 9.4
Thanks!
-
EL9 support is still in beta with CWP. Test for that error when it is fully production ready for AlmaLinux 9
-
There seems to be a install problem.
nano /usr/local/apache/conf.d/mod_security.conf
Line 2 Add liblua-5.4.so to the end.
systemctl start httpd
-
I am having this same issue after installing cwp on Alma-9.
Can anyone share how they might have solved it?
-
What is the error message Apache is giving?
From what I've seen, the above fixes it.
-
Its resolved now
-
how to solve this problem. plss help.;
-
Its resolved now
edit mod_security.conf
nano /usr/local/apache/conf.d/mod_security.conf
LoadFile /usr/lib64/libxml2.so
LoadFile /usr/lib64/ <<<----------------remove this line.
<IfModule !unique_id_module>
LoadModule unique_id_module modules/mod_unique_id.so
</IfModule>
<IfModule !mod_security2.c>
LoadModule security2_module modules/mod_security2.so
</IfModule>
<IfModule mod_security2.c>
<IfModule mod_ruid2.c>
SecAuditLogStorageDir /usr/local/apache/logs/modsec_audit
SecAuditLogType Concurrent
</IfModule>
<IfModule itk.c>
SecAuditLogStorageDir /usr/local/apache/logs/modsec_audit
SecAuditLogType Concurrent
</IfModule>
-
Actually the fix is to add - liblua-5.4.so
to the end of that line for AlmaLinux.
After it should read:
LoadFile /usr/lib64/liblua-5.4.so
This fix was mentioned above, and has been tested and works on all of our new servers.
-
Actually the fix is to add - liblua-5.4.so
to the end of that line for AlmaLinux.
After it should read:
LoadFile /usr/lib64/liblua-5.4.so
This fix was mentioned above, and has been tested and works on all of our new servers.
Thank you so much!
-
EL9 support is still in beta with CWP. Test for that error when it is fully production ready for AlmaLinux 9
Hi,
Is AL9 support with CWP still beta?
AL?
BR
Venty
-
All new servers we've activated have AL9 (AlmaLinux 9).
It installs a little different, but seems to be working well.
If you need PHP below 7.4, then you'll still have to install CWP on AL8 (AlmaLinux 8 )
[Edited for typeo's]
-
All new servers we've activated have AL9 (AlmaLinux 9).
It installs a little different, but seems to be working well.
If you need PHP below 7.4, then you'll still have to install CWP on AL8 (AlmaLinux 8 )
[Edited for typeo's]
Hi,
you last recommended me this installation:
https://forum.centos-webpanel.com/apache/issues-with-brand-new-fresh-install-with-almalinux-9-4/msg49150/#msg49150
but at the end it says that you are using an internal installation guide:
"We are always tweaking the AL9 install process, that's just a small fraction of the current AL9 internal guide we use that is 12 pages long. :/"
....is it possible to have a look at it
.
Thanks in advance!
BR
Venty
-
The only things not mentioned in the link where like setting the time zone, DNS servers, setting hostname, adding SWAP (if needed), Kernel upgrade, upgrading MariaDB, security tweaks, and install monitoring and reporting tools.
Everyone has their own preferences when it comes to stuff like that.
Here are some links for updates that we would recommend after a new installation:
https://www.alphagnu.com/topic/43-disable-php-mail-function-in-cwp-%E2%80%93-control-webpanel/ (https://www.alphagnu.com/topic/43-disable-php-mail-function-in-cwp-%E2%80%93-control-webpanel/)
https://www.alphagnu.com/topic/24-cwp-%E2%80%93-control-web-panel-install-latest-apache-2462-version/ (https://www.alphagnu.com/topic/24-cwp-%E2%80%93-control-web-panel-install-latest-apache-2462-version/)
https://www.alphagnu.com/topic/28-cwp-apache-restore-original-visitor-ips-with-mod_remoteip-when-using-cloudflare-proxy/ (https://www.alphagnu.com/topic/28-cwp-apache-restore-original-visitor-ips-with-mod_remoteip-when-using-cloudflare-proxy/)
https://www.alphagnu.com/topic/33-update-cwp-roundcube-mail-version-156-%E2%80%93-control-web-panel/ (https://www.alphagnu.com/topic/33-update-cwp-roundcube-mail-version-156-%E2%80%93-control-web-panel/)
https://www.alphagnu.com/topic/508-solution-for-returning-attackers-when-restarting-csf/ (https://www.alphagnu.com/topic/508-solution-for-returning-attackers-when-restarting-csf/)
CWP has a support wiki on how to upgrade MariaDB also.
The current 2 LTS are 10.11 and 11.4.
-
So my mod config already had the correction stated about.
LoadFile /usr/lib64/liblua-5.4.so ...and that didnt fix it.
I uninstalled modsec and apache server is back on line. I got a journal syntax error referring to line 512 in httpd config. When modsecurity was installed it appended to lines and saved the original config file. the only difference was the addition of 3 lines at the end of the apache config file.
ExtendedStatus On
Include /usr/local/apache/conf/sharedip.conf
Include /usr/local/apache/conf.d/*.conf
-
That's not a valid config for ModSecurity.
One is generated automatically and installed when you install ModSecurity, so not sure how that happened.
If you are using the old Comodo the main configuration should look like (/usr/local/apache/conf.d/mod_security.conf)
LoadFile /usr/lib64/libxml2.so
LoadFile /usr/lib64/liblua-5.4.so
<IfModule !unique_id_module>
LoadModule unique_id_module modules/mod_unique_id.so
</IfModule>
<IfModule !mod_security2.c>
LoadModule security2_module modules/mod_security2.so
</IfModule>
<IfModule mod_security2.c>
<IfModule mod_ruid2.c>
SecAuditLogStorageDir /usr/local/apache/logs/modsec_audit
SecAuditLogType Concurrent
</IfModule>
<IfModule itk.c>
SecAuditLogStorageDir /usr/local/apache/logs/modsec_audit
SecAuditLogType Concurrent
</IfModule>
SecRuleEngine On
SecAuditEngine RelevantOnly
SecAuditLog /usr/local/apache/logs/modsec_audit.log
SecDebugLog /usr/local/apache/logs/modsec_debug.log
SecAuditLogType Serial
SecDebugLogLevel 0
SecRequestBodyAccess On
SecDataDir /tmp
SecTmpDir /tmp
SecUploadDir /tmp
SecCollectionTimeout 600
SecPcreMatchLimit 1250000
SecPcreMatchLimitRecursion 1250000
Include "/usr/local/apache/modsecurity-cwaf/cwaf.conf"
</IfModule>
From your input, it looks like you are trying to load the site config files from the WebServers Configuration Editor.