MESSENGERV3 will not work on Debian/Ubuntu

This forum is only for reproducible bugs with csf and lfd (i.e. not iptables problems, lack of understanding how to use a feature, etc). Posts must be accompanied with full technical details of the problem and how it can be recreated. Any posts not adhering to this, or not considered bugs, will be moved to the General Discussion (csf) forum.
Post Reply
marcele
Junior Member
Posts: 191
Joined: 17 Sep 2007, 17:02

MESSENGERV3 will not work on Debian/Ubuntu

Post 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.
marcele
Junior Member
Posts: 191
Joined: 17 Sep 2007, 17:02

Re: MESSENGERV3 will not work on Debian/Ubuntu

Post 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
ForumAdmin
Moderator
Posts: 1504
Joined: 01 Oct 2008, 09:24

Re: MESSENGERV3 will not work on Debian/Ubuntu

Post 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.
Post Reply