Page 1 of 1

MESSENGERV3 will not work on Debian/Ubuntu

Posted: 13 Apr 2021, 14:27
by marcele
In my testing I wasn't able to get the MESSENGERV3 to work correctly on Debian/Ubuntu servers (It can't find the SSL certificates). It looks like there is a bug in the Messenger.pm conftree function because it can't process the relative includes used by default on Debian/Ubuntu.

The config used in /etc/csf/csf.conf:

Code: Select all

MESSENGERV3 = "1"
MESSENGERV3LOCATION = "/etc/apache2/conf-enabled/"
MESSENGERV3RESTART = "systemctl restart apache2"
MESSENGERV3TEST = "/usr/sbin/apachectl -t"
MESSENGERV3HTTPS_CONF = "/etc/apache2/apache2.conf"
MESSENGERV3WEBSERVER = "apache"
MESSENGERV3PERMS = "711"
MESSENGERV3GROUP = "www-data"
After restarting LFD

Code: Select all

Apr 13 05:38:27 tpl_ubuntu18 lfd[59258]: Messenger HTTPS Service starting...
Apr 13 05:38:27 tpl_ubuntu18 lfd[59258]: Messenger HTML Service starting...
Apr 13 05:38:27 tpl_ubuntu18 lfd[59269]: SSL: Processing [/etc/apache2/apache2.conf]
Apr 13 05:38:27 tpl_ubuntu18 lfd[59269]: SSL: IncludeOptional [/mods-enabled/*.load]
Apr 13 05:38:27 tpl_ubuntu18 lfd[59269]: SSL: IncludeOptional [/mods-enabled/*.conf]
Apr 13 05:38:27 tpl_ubuntu18 lfd[59269]: SSL: Including [/ports.conf]
Apr 13 05:38:27 tpl_ubuntu18 lfd[59269]: SSL: IncludeOptional [/conf-enabled/*.conf]
Apr 13 05:38:27 tpl_ubuntu18 lfd[59269]: SSL: IncludeOptional [/sites-enabled/*.conf]
Apr 13 05:38:27 tpl_ubuntu18 lfd[59269]: *MESSENGERV3* Error: No SSL domains found in MESSENGERV3HTTPS_CONF location [/etc/apache2/apache2.conf] for apache web server
The problem is because on Debian/Ubuntu the default includes in /etc/apache2/apache2.conf are relative:

Code: Select all

# Include generic snippets of statements
IncludeOptional conf-enabled/*.conf

# Include the virtual host configurations:
IncludeOptional sites-enabled/*.conf
Changing the IncludeOptional lines in /etc/apache2/apache2.conf to the full path fixes the issue and all the SSL certificates are found properly like on Centos/RHEL/Cloudlinux. I think the simplest fix would just to alter the conftree function to detect if the include line starts with a leading slash and if not just prefix them off the /etc/apache2/ directory.

Re: MESSENGERV3 will not work on Debian/Ubuntu

Posted: 14 Apr 2021, 10:28
by marcele
One last thing that I also noticed was that there seems to be an extra slash in the lfd messenger v3 log with the defaults (Although it doesn't seem to cause any problems):

The default messenger location:

Code: Select all

MESSENGERV3LOCATION = "/etc/httpd/conf.d/"
When restarting LFD this is in the log (notice the double forward slash):

Code: Select all

MESSENGERV3: Restarted apache MESSENGERV3 service using /etc/httpd/conf.d//csf.messenger.conf

Re: MESSENGERV3 will not work on Debian/Ubuntu

Posted: 15 Apr 2021, 11:34
by ForumAdmin
We will have a fix for configurations that don't define the Apache setting ServerRoot in the next release of csf.

The double slashes is not an issue.