Xymon Mailing List Archive search

First time installed, and set up xymon, failed, NEED helps please.

21 messages in this thread

list Kern Doe · Tue, 26 Sep 2017 20:57:14 +0000 (UTC) ·
Hello,
I'm a complete newbie to xymon and I don't have any luck on getting this to work yet. If you guys can help me out to at least see the xymon screen I really appreciate it, since I'm not getting that far.Kern --

Followings are what I've done:
1) my virtual Centos Linux (6.5)
    hostname: centos_hp0
    hostname -i: 172.20.10.5

2) my apache is up and running:
    ps -eaf | grep http
    root     26388     1  0 16:36 ?        00:00:00 /usr/sbin/httpd
    apache   26391 26388  0 16:36 ?        00:00:00 /usr/sbin/httpd
    apache   26392 26388  0 16:36 ?        00:00:00 /usr/sbin/httpd
    apache   26393 26388  0 16:36 ?        00:00:00 /usr/sbin/httpd
    apache   26394 26388  0 16:36 ?        00:00:00 /usr/sbin/httpd
    apache   26395 26388  0 16:36 ?        00:00:00 /usr/sbin/httpd
    apache   26396 26388  0 16:36 ?        00:00:00 /usr/sbin/httpd
    apache   26397 26388  0 16:36 ?        00:00:00 /usr/sbin/httpd
    apache   26398 26388  0 16:36 ?        00:00:00 /usr/sbin/httpd


2) installed xymon 4.3.28 on my virtual CentOS

my hosts.cfg:
ls -alt `find / -name "*host*cfg"`
ls -alt `find / -name "*hosts*.cfg"`
    -rw-r--r--. 1 xymon xymon 559 Sep 26 14:25 /home/xymon/server/etc/hosts.cfg
    -rw-r--r--. 1 root  root  613 Sep 25 10:22 /etc/hosts.cfg

cat /etc/hosts.cfg
    172.20.10.5   centos_hp0


ls -alt /var/www/html
    total 12
    drwxr-xr-x. 2 root root 4096 Sep 26 16:45 .
    lrwxrwxrwx. 1 root root   33 Sep 26 16:45 index.html -> /home/xymon/server/www/xymon.html

        ** do I need to modify this file?

xmon's index.html:
ls -al /home/xymon/server/www
    total 92
    drwxr-xr-x. 10 xymon xymon   4096 Sep 26 16:48 .
    drwxr-xr-x.  9 xymon xymon   4096 Sep 26 14:25 ..
    -rw-r--r--.  1 xymon xymon   4767 Sep 26 16:48 critical.html
    drwxr-xr-x.  2 xymon xymon   4096 Sep 26 14:25 gifs
    drwxr-xr-x.  3 xymon xymon   4096 Sep 26 14:25 help
    drwxr-xr-x.  2 xymon xymon   4096 Sep 26 14:23 html
    lrwxrwxrwx.  1 xymon xymon     10 Sep 26 16:48 index.html -> xymon.html
    drwxr-xr-x.  2 xymon xymon   4096 Sep 26 14:25 menu
    -rw-r--r--.  1 xymon xymon  20556 Sep 26 16:48 nongreen.html
    drwxr-xr-x.  2 xymon xymon   4096 Sep 26 14:23 notes
    -rw-r--r--.  1 xymon xymon   6591 Sep 26 16:48 red.html
    drwxrwxr-x.  2 xymon nobody  4096 Sep 26 14:23 rep
    drwxrwxr-x.  2 xymon nobody  4096 Sep 26 14:23 snap
    drwxr-xr-x.  2 xymon xymon   4096 Sep 26 14:23 wml
    -rw-r--r--.  1 xymon xymon  11317 Sep 26 16:48 xymon.html


start xymon:
    /home/xymon/server/xymon.sh start
    Xymon started


on the browser, type: 172.20.10.5
Forbidden

You don't have permission to access / on this server.

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
Apache/2.2.15 (CentOS) Server at 172.20.10.5 Port 80


    Let's go GreenThis email contains 100% recycled electrons.
list Japheth Cleaver · Tue, 26 Sep 2017 14:43:08 -0700 ·
On 9/26/2017 1:57 PM, Kern Doe wrote:
Hello,
I'm a complete newbie to xymon and I don't have any luck on getting this to work yet. If you guys can help me out to at least see the xymon screen I really appreciate it, since I'm not getting that far.
Kern --
Hi Kern,

No worries. Lists are here to help.
quoted from Kern Doe
Followings are what I've done:
1) my virtual Centos Linux (6.5)
     hostname: centos_hp0
     hostname -i: 172.20.10.5
I don't *believe* this will cause a problem within xymon, but hostnames with underscores can cause problems for some tools, even if it's allowed as a component of a DNS label.


*snip*
quoted from Kern Doe
ls -alt /var/www/html
     total 12
     drwxr-xr-x. 2 root root 4096 Sep 26 16:45 .
     lrwxrwxrwx. 1 root root   33 Sep 26 16:45 index.html -> /home/xymon/server/www/xymon.html

         ** do I need to modify this file?
Xymon will automatically create this symlink, although it's odd that it's in a distinct server root. Can you provide the WWW directory settings from within your xymonserver.cfg file?
quoted from Kern Doe

xmon's index.html:
ls -al /home/xymon/server/www
     total 92
     drwxr-xr-x. 10 xymon xymon   4096 Sep 26 16:48 .
     drwxr-xr-x.  9 xymon xymon   4096 Sep 26 14:25 ..
     -rw-r--r--.  1 xymon xymon   4767 Sep 26 16:48 critical.html
     drwxr-xr-x.  2 xymon xymon   4096 Sep 26 14:25 gifs
     drwxr-xr-x.  3 xymon xymon   4096 Sep 26 14:25 help
     drwxr-xr-x.  2 xymon xymon   4096 Sep 26 14:23 html
     lrwxrwxrwx.  1 xymon xymon     10 Sep 26 16:48 index.html -> xymon.html
     drwxr-xr-x.  2 xymon xymon   4096 Sep 26 14:25 menu
     -rw-r--r--.  1 xymon xymon  20556 Sep 26 16:48 nongreen.html
     drwxr-xr-x.  2 xymon xymon   4096 Sep 26 14:23 notes
     -rw-r--r--.  1 xymon xymon   6591 Sep 26 16:48 red.html
     drwxrwxr-x.  2 xymon nobody  4096 Sep 26 14:23 rep
     drwxrwxr-x.  2 xymon nobody  4096 Sep 26 14:23 snap
     drwxr-xr-x.  2 xymon xymon   4096 Sep 26 14:23 wml
     -rw-r--r--.  1 xymon xymon  11317 Sep 26 16:48 xymon.html
This indicates that xymon is working okay (or, more specifically, that xymongen executed and was able to write these *.html files at least once).

You should be able to validate that xymond is running by looking at the output of 'ps axfww' on your machine.
quoted from Kern Doe

on the browser, type: 172.20.10.5
Forbidden

You don't have permission to access / on this server.

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
Apache/2.2.15 (CentOS) Server at 172.20.10.5 Port 80
This, combined with the ls listings above, would seem to indicate that there's some confusion on where xymon is configured to output its www files vs where the xymon.conf file in /etc/httpd/conf.d/ has the ServerRoot pointed to. Typically this is handled with an "Alias /xymon" line, but it can be configured wherever you'd like as long as the $XYMONSERVERWWWURL variable in xymonserver.cfg is set to the same.

I think all you may need to do is set XYMONWWWDIR=/var/www/html and XYMONSERVERWWWURL=/ in xymonserver.cfg and restart the service, assuming that you want xymon's display to live at the root of your web directory.

You'll also want to check the apache error logs for more details (they'll be in /var/log/httpd/).


HTH,
-jc
list Josh Luthman · Tue, 26 Sep 2017 17:49:43 -0400 ·
I'm not seeing the httpd config, did you check that?

Josh Luthman
Office: XXX-XXX-XXXX
Direct: XXX-XXX-XXXX
XXXX Wayne St
Suite XXXX
Troy, OH XXXXX
quoted from Japheth Cleaver

On Sep 26, 2017 5:43 PM, "Japheth Cleaver" <user-87556346d4af@xymon.invalid> wrote:
On 9/26/2017 1:57 PM, Kern Doe wrote:
Hello,
I'm a complete newbie to xymon and I don't have any luck on getting this
to work yet. If you guys can help me out to at least see the xymon screen I
really appreciate it, since I'm not getting that far.
Kern --
Hi Kern,

No worries. Lists are here to help.

Followings are what I've done:
1) my virtual Centos Linux (6.5)
     hostname: centos_hp0
     hostname -i: 172.20.10.5
I don't *believe* this will cause a problem within xymon, but hostnames
with underscores can cause problems for some tools, even if it's allowed as
a component of a DNS label.


*snip*
ls -alt /var/www/html
     total 12
     drwxr-xr-x. 2 root root 4096 Sep 26 16:45 .
     lrwxrwxrwx. 1 root root   33 Sep 26 16:45 index.html ->
/home/xymon/server/www/xymon.html

         ** do I need to modify this file?
Xymon will automatically create this symlink, although it's odd that it's
in a distinct server root. Can you provide the WWW directory settings from
within your xymonserver.cfg file?

xmon's index.html:
ls -al /home/xymon/server/www
     total 92
     drwxr-xr-x. 10 xymon xymon   4096 Sep 26 16:48 .
     drwxr-xr-x.  9 xymon xymon   4096 Sep 26 14:25 ..
     -rw-r--r--.  1 xymon xymon   4767 Sep 26 16:48 critical.html
     drwxr-xr-x.  2 xymon xymon   4096 Sep 26 14:25 gifs
     drwxr-xr-x.  3 xymon xymon   4096 Sep 26 14:25 help
     drwxr-xr-x.  2 xymon xymon   4096 Sep 26 14:23 html
     lrwxrwxrwx.  1 xymon xymon     10 Sep 26 16:48 index.html ->
xymon.html
     drwxr-xr-x.  2 xymon xymon   4096 Sep 26 14:25 menu
     -rw-r--r--.  1 xymon xymon  20556 Sep 26 16:48 nongreen.html
     drwxr-xr-x.  2 xymon xymon   4096 Sep 26 14:23 notes
     -rw-r--r--.  1 xymon xymon   6591 Sep 26 16:48 red.html
     drwxrwxr-x.  2 xymon nobody  4096 Sep 26 14:23 rep
     drwxrwxr-x.  2 xymon nobody  4096 Sep 26 14:23 snap
     drwxr-xr-x.  2 xymon xymon   4096 Sep 26 14:23 wml
     -rw-r--r--.  1 xymon xymon  11317 Sep 26 16:48 xymon.html
This indicates that xymon is working okay (or, more specifically, that
xymongen executed and was able to write these *.html files at least once).

You should be able to validate that xymond is running by looking at the
output of 'ps axfww' on your machine.


on the browser, type: 172.20.10.5
Forbidden

You don't have permission to access / on this server.

Additionally, a 403 Forbidden error was encountered while trying to use
an ErrorDocument to handle the request.
Apache/2.2.15 (CentOS) Server at 172.20.10.5 Port 80
This, combined with the ls listings above, would seem to indicate that
there's some confusion on where xymon is configured to output its www files
vs where the xymon.conf file in /etc/httpd/conf.d/ has the ServerRoot
pointed to. Typically this is handled with an "Alias /xymon" line, but it
can be configured wherever you'd like as long as the $XYMONSERVERWWWURL
variable in xymonserver.cfg is set to the same.

I think all you may need to do is set XYMONWWWDIR=/var/www/html and
XYMONSERVERWWWURL=/ in xymonserver.cfg and restart the service, assuming
that you want xymon's display to live at the root of your web directory.

You'll also want to check the apache error logs for more details (they'll
be in /var/log/httpd/).


HTH,
-jc

list Bruce Ferrell · Tue, 26 Sep 2017 15:53:50 -0700 ·
Apache, out of the box, will not follow symlinks.

In your source tree look for xymon-apache.conf and put it into /etc/httpd/conf.d  then restart apache


On 09/26/2017 01:57 PM, Kern Doe via Xymon wrote:
list Adrian Ball · Wed, 27 Sep 2017 10:13:31 +0000 (UTC) ·
Looks more like an Apache config problem than Xymon.
Do you have FollowSymLinks set?

e.g.

  DocumentRoot "/var/www/html"

  <Directory "/var/www/html">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Require all granted
  </Directory>

Then I would take a look at the apache error log, it's usually pretty
helpful in pointing out what the problem is.

-- 
Adrian Ball                  || user-81c4e435572d@xymon.invalid
                             || https://u3456959.ct.sendgrid.net/wf/click?upn=R34NQM2MkN3BtyfBWwgeFOb4iYjJPXeGlAXBLcyamDQ-3D_FmobG8Uig9LluLwSQmbmsv2L2XI6eE5lmMF5BxLVPRVxj2TELXpSH7ZrKWU9Hj2-2BwLvKKsi5VK1zH4AAzrJBqP2K0-2Fsv7NtEcCfrqiEjMoLn-2BQCWvBLIJMe6MaiWpk2gyMSGcpX-2Bu9Z-2BI9PzbG7fHrJyE-2BNVCIDSuOWdMJP7xGa6oWU9iPwnOniW6dBmtmPMAi-2F7dFUmlPuEPG-2FDiM9LVw-3D-3D
Tel: XXXXX XXXXXX            || Yahoo/AIM/MSN: adeatwollaton
Mobile: XXXXX XXXXXX         || https://u3456959.ct.sendgrid.net/wf/click?upn=R34NQM2MkN3BtyfBWwgeFGuK9n9Li8AjKiXOeggyi2xLQi5y6GKxcvIIVp9rtqmy_FmobG8Uig9LluLwSQmbmsv2L2XI6eE5lmMF5BxLVPRVxj2TELXpSH7ZrKWU9Hj2-2BELUbSSQeLJac7JPPJY3YLjpNOqvxqXU8oOe5b7ibJ53ss2GNVXZw4EDfRbqeSm91YG-2BK97BxLuX3rRCgGzfEIFzhY957HB3IJgdvGWc1axkOoN7EFW10QuSyN2lT5tm4p056uwGP-2FSyWTpvZn9IjQA-3D-3D
list Kern Doe · Wed, 27 Sep 2017 17:02:05 +0000 (UTC) ·
I thank to everyone who has replied to my email, if I miss anyone, I do apologize.
Ok, so I've got super confused and you know what, I'm going to start everything all over fresh and clean -- that way, I can document it as I go along. I will do followings:1) shutdown xymon, and apache
2) I will even remove xymon ID and recreate it.3) keep /etc/hosts.cfg        cat /etc/hosts.cfg                172.20.10.5   centos_hp0      # bbd http://centos_hp0/
 4) remove xymon's stuff in /etc/httpd/conf.d5) keep my test file for testing apache: /var/www/html/index.html
                    cat index.html
                                    Welcome to Kern's webserver
        (sorry, I'm a real novice with apache since I'm a DBA)

6) anything else should I do as parts of trying to uninstall xymon, then reinstall?
Thank you!!Kern --

Let's go GreenThis email contains 100% recycled electrons.

   
   From: Adrian Ball <user-81c4e435572d@xymon.invalid>
 To: xymon at xymon.com 
 Sent: Wednesday, September 27, 2017 6:19 AM
 Subject: Re: [Xymon] First time installed, and set up xymon, failed, NEED helps please.
  
Looks more like an Apache config problem than Xymon. Do you have FollowSymLinks set?e.g.DocumentRoot "/var/www/html"<Directory "/var/www/html">
  Options Indexes FollowSymLinks MultiViews
  AllowOverride None
  Require all granted
</Directory>Then I would take a look at the apache error log, it's usually pretty helpful in pointing out what the problem is.— Adrian Ball || user-81c4e435572d@xymon.invalid|| http://www.hp5.co.uk/Tel: XXXXX XXXXXX || Yahoo/AIM/MSN: adeatwollaton Mobile: XXXXX XXXXXX || http://www.facebook.com/adrian.ball3
list Kern Doe · Wed, 27 Sep 2017 19:39:16 +0000 (UTC) ·
Hello, 
I've reinstalled xymon with following steps:1) unpack the downloaded xymon binary version 4.3.28 in /tmp        (as root)
2) run configure script                            (as root)
    A few info to note: 
        used mostly default values including 
            group-ID=nobody
             IP-address of this host = 172.20.10.5

3) run: make                                (as root)
4) run: make install                            (as root)

5) Notes from xymon after the installation
    You must configure your webserver for the Xymon webpages and CGI-scripts.
    A sample Apache configuration is in /home/xymon/server/etc/xymon-apache.conf
    If you have your Administration CGI scripts in a separate directory,
    then you must also setup the password-file with the htpasswd command.

    To start Xymon, as the xymon user run '/home/xymon/server/bin/xymon.sh start'
    To view the Xymon webpages, go to http://centos_hp0/xymon

 I'm kind of pausing at "You must configure your webserver for the Xymon webpages and CGI-scripts"... Any additional help is greatly appreciated.Kern --
quoted from Kern Doe
  Let's go GreenThis email contains 100% recycled electrons.

      From: Kern Doe via Xymon <xymon at xymon.com>
 To: Adrian Ball <user-81c4e435572d@xymon.invalid>; "xymon at xymon.com" <xymon at xymon.com>; "user-87556346d4af@xymon.invalid" <user-87556346d4af@xymon.invalid>; "user-4c45a83f15cb@xymon.invalid" <user-4c45a83f15cb@xymon.invalid>; "user-24fbf1912cfe@xymon.invalid" <user-24fbf1912cfe@xymon.invalid>; "xymon at xymon.com" <xymon at xymon.com> 
 Sent: Wednesday, September 27, 2017 1:12 PM
 Subject: Re: [Xymon] First time installed, and set up xymon, failed, NEED helps please.
   
I thank to everyone who has replied to my email, if I miss anyone, I do apologize.
Ok, so I've got super confused and you know what, I'm going to start everything all over fresh and clean -- that way, I can document it as I go along. I will do followings:1) shutdown xymon, and apache
2) I will even remove xymon ID and recreate it.3) keep /etc/hosts.cfg        cat /etc/hosts.cfg                172.20.10.5   centos_hp0      # bbd http://centos_hp0/
 4) remove xymon's stuff in /etc/httpd/conf.d5) keep my test file for testing apache: /var/www/html/index.html
                    cat index.html
                                    Welcome to Kern's webserver
        (sorry, I'm a real novice with apache since I'm a DBA)

6) anything else should I do as parts of trying to uninstall xymon, then reinstall?
Thank you!!Kern --

Let's go GreenThis email contains 100% recycled electrons.

   
   From: Adrian Ball <user-81c4e435572d@xymon.invalid>
 To: xymon at xymon.com 
 Sent: Wednesday, September 27, 2017 6:19 AM
 Subject: Re: [Xymon] First time installed, and set up xymon, failed, NEED helps please.
  
Looks more like an Apache config problem than Xymon. Do you have FollowSymLinks set?e.g.DocumentRoot "/var/www/html"<Directory "/var/www/html">
  Options Indexes FollowSymLinks MultiViews
  AllowOverride None
  Require all granted
</Directory>Then I would take a look at the apache error log, it's usually pretty helpful in pointing out what the problem is.— Adrian Ball || user-81c4e435572d@xymon.invalid|| http://www.hp5.co.uk/Tel: XXXXX XXXXXX || Yahoo/AIM/MSN: adeatwollaton Mobile: XXXXX XXXXXX || http://www.facebook.com/adrian.ball3

list Josh Luthman · Wed, 27 Sep 2017 15:40:10 -0400 ·
    A sample Apache configuration is in
/home/xymon/server/etc/xymon-apache.conf

That goes in your httpd.conf
quoted from Josh Luthman


Josh Luthman
Office: XXX-XXX-XXXX
Direct: XXX-XXX-XXXX
XXXX Wayne St
Suite XXXX
Troy, OH XXXXX

On Wed, Sep 27, 2017 at 3:39 PM, Kern Doe <user-878ab27f72eb@xymon.invalid> wrote:
Hello,

I've reinstalled xymon with following steps:
1) unpack the downloaded xymon binary version 4.3.28 in /tmp        (as
quoted from Kern Doe
root)
2) run configure script                            (as root)
    A few info to note:
        used mostly default values including
            group-ID=nobody
             IP-address of this host = 172.20.10.5

3) run: make                                (as root)
4) run: make install                            (as root)

5) Notes from xymon after the installation
    You must configure your webserver for the Xymon webpages and
CGI-scripts.

    A sample Apache configuration is in /home/xymon/server/etc/xymon-
apache.conf
quoted from Kern Doe
    If you have your Administration CGI scripts in a separate directory,
    then you must also setup the password-file with the htpasswd command.

    To start Xymon, as the xymon user run '/home/xymon/server/bin/xymon.sh
start'
    To view the Xymon webpages, go to http://centos_hp0/xymon

 I'm kind of pausing at "You must configure your webserver for the Xymon
webpages and CGI-scripts"...

 Any additional help is greatly appreciated.
Kern --


*Let's go Green*
*This email contains 100% recycled electrons.*
quoted from Kern Doe


*From:* Kern Doe via Xymon <xymon at xymon.com>
*To:* Adrian Ball <user-81c4e435572d@xymon.invalid>; "xymon at xymon.com" <xymon at xymon.com>; "
user-87556346d4af@xymon.invalid" <user-87556346d4af@xymon.invalid>; "
user-4c45a83f15cb@xymon.invalid" <user-4c45a83f15cb@xymon.invalid>; "
user-24fbf1912cfe@xymon.invalid" <user-24fbf1912cfe@xymon.invalid>; "xymon at xymon.com" <
xymon at xymon.com>
*Sent:* Wednesday, September 27, 2017 1:12 PM
*Subject:* Re: [Xymon] First time installed, and set up xymon, failed,
NEED helps please.

I thank to everyone who has replied to my email, if I miss anyone, I do
apologize.

Ok, so I've got super confused and you know what, I'm going to start
everything all over fresh and clean -- that way, I can document it as I go

along. I will do followings:
1) shutdown xymon, and apache
2) I will even remove xymon ID and recreate it.
3) keep /etc/hosts.cfg
        cat /etc/hosts.cfg
                172.20.10.5   centos_hp0      # bbd http://centos_hp0/

4) remove xymon's stuff in /etc/httpd/conf.d
5) keep my test file for testing apache: /var/www/html/index.html
quoted from Kern Doe
                    cat index.html
                                    Welcome to Kern's webserver

        (sorry, I'm a real novice with apache since I'm a DBA)

6) anything else should I do as parts of trying to uninstall xymon, then
reinstall?

Thank you!!
Kern --

*Let's go Green*
*This email contains 100% recycled electrons.*
quoted from Kern Doe


*From:* Adrian Ball <user-81c4e435572d@xymon.invalid>
*To:* xymon at xymon.com
*Sent:* Wednesday, September 27, 2017 6:19 AM
*Subject:* Re: [Xymon] First time installed, and set up xymon, failed,
NEED helps please.

Looks more like an Apache config problem than Xymon. Do you have
FollowSymLinks set?
e.g.

DocumentRoot "/var/www/html"

<Directory "/var/www/html">
  Options Indexes FollowSymLinks MultiViews
  AllowOverride None
  Require all granted
</Directory>

Then I would take a look at the apache error log, it's usually pretty
helpful in pointing out what the problem is.
— Adrian Ball || user-81c4e435572d@xymon.invalid

|| http://www.hp5.co.uk/

Tel: XXXXX XXXXXX || Yahoo/AIM/MSN: adeatwollaton Mobile: XXXXX XXXXXX ||
http://www.facebook.com/adrian.ball3
<https://u3456959.ct.sendgrid.net/wf/click?upn=R34NQM2MkN3BtyfBWwgeFGuK9n9Li8AjKiXOeggyi2xLQi5y6GKxcvIIVp9rtqmy_FmobG8Uig9LluLwSQmbmsv2L2XI6eE5lmMF5BxLVPRVxj2TELXpSH7ZrKWU9Hj2-2BjJclr7WSSrX7Oj-2FrmYdDB2afiLzMUkvSgLIXWwtgskALhXbgOSu0OqNADd5TVgJTiKYg00vOz37Wg35sApIokdvMCG0xMd21oT7sfoePBeGF5pQzsf3Uei4QthE-2FlWPjsbPRtXicl6gDJ4dwE2OANQ-3D-3D>;

list Kern Doe · Wed, 27 Sep 2017 20:02:35 +0000 (UTC) ·
......

7) service httpd start
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using 172.20.10.5 for ServerName
                                                           [  OK  ]

8) From Josh Luthman's advice:
quoted from Josh Luthman

    A sample Apache configuration is in /home/xymon/server/etc/xymon-apache.conf
    That goes in your httpd.conf

9) Saved file before modifying it
    cd /etc/httpd/conf
    cp -p httpd.conf httpd.conf.ORIG

10) Appended contents of file: /home/xymon/server/etc/xymon-apache.conf
    to the bottom of file: /etc/httpd/conf/httpd.conf

11) Restarted apache (service httpd restart)

12) Started xymon: 
    /home/xymon/server/bin/xymon.sh start
    Xymon started 

12) http://centos_hp0/xymon
    or http://172.20.10.5/xymon

    Forbidden

    You don't have permission to access /xymon on this server.
signature
    Apache/2.2.15 (CentOS) Server at 172.20.10.5 Port 80

    Let's go GreenThis email contains 100% recycled electrons.

quoted from Josh Luthman
      From: Josh Luthman <user-4c45a83f15cb@xymon.invalid>
 To: Kern Doe <user-878ab27f72eb@xymon.invalid> 
Cc: Adrian Ball <user-81c4e435572d@xymon.invalid>; "xymon at xymon.com" <xymon at xymon.com>; "user-87556346d4af@xymon.invalid" <user-87556346d4af@xymon.invalid>; "user-24fbf1912cfe@xymon.invalid" <user-24fbf1912cfe@xymon.invalid>
 Sent: Wednesday, September 27, 2017 3:40 PM
 Subject: Re: [Xymon] First time installed, and set up xymon, failed, NEED helps please.
   
    A sample Apache configuration is in /home/xymon/server/etc/xymon-apache.conf
That goes in your httpd.conf

Josh Luthman
Office: XXX-XXX-XXXX
Direct: XXX-XXX-XXXX
XXXX Wayne St
Suite XXXX
Troy, OH XXXXX
On Wed, Sep 27, 2017 at 3:39 PM, Kern Doe <user-878ab27f72eb@xymon.invalid> wrote:

Hello, 
I've reinstalled xymon with following steps:1) unpack the downloaded xymon binary version 4.3.28 in /tmp        (as root)
2) run configure script                            (as root)
    A few info to note: 
        used mostly default values including 
            group-ID=nobody
             IP-address of this host = 172.20.10.5

3) run: make                                (as root)
4) run: make install                            (as root)

5) Notes from xymon after the installation
    You must configure your webserver for the Xymon webpages and CGI-scripts.
    A sample Apache configuration is in /home/xymon/server/etc/xymon- apache.conf
    If you have your Administration CGI scripts in a separate directory,
    then you must also setup the password-file with the htpasswd command.

    To start Xymon, as the xymon user run '/home/xymon/server/bin/xymon. sh start'
signature
    To view the Xymon webpages, go to http://centos_hp0/xymon

 I'm kind of pausing at "You must configure your webserver for the Xymon webpages and CGI-scripts"... Any additional help is greatly appreciated.Kern --
  Let's go GreenThis email contains 100% recycled electrons.

quoted from Kern Doe
      From: Kern Doe via Xymon <xymon at xymon.com>
 To: Adrian Ball <user-81c4e435572d@xymon.invalid>; "xymon at xymon.com" <xymon at xymon.com>; "user-87556346d4af@xymon.invalid" <user-87556346d4af@xymon.invalid>; "user-4c45a83f15cb@xymon.invalid" <user-4c45a83f15cb@xymon.invalid>; "user-24fbf1912cfe@xymon.invalid" <user-24fbf1912cfe@xymon.invalid>; "xymon at xymon.com" <xymon at xymon.com> 
 Sent: Wednesday, September 27, 2017 1:12 PM
 Subject: Re: [Xymon] First time installed, and set up xymon, failed, NEED helps please.
   
I thank to everyone who has replied to my email, if I miss anyone, I do apologize.
Ok, so I've got super confused and you know what, I'm going to start everything all over fresh and clean -- that way, I can document it as I go along. I will do followings:1) shutdown xymon, and apache
2) I will even remove xymon ID and recreate it.3) keep /etc/hosts.cfg        cat /etc/hosts.cfg                172.20.10.5   centos_hp0      # bbd http://centos_hp0/
 4) remove xymon's stuff in /etc/httpd/conf.d5) keep my test file for testing apache: /var/www/html/index.html
                    cat index.html
                                     Welcome to Kern's webserver
        (sorry, I'm a real novice with apache since I'm a DBA)

6) anything else should I do as parts of trying to uninstall xymon, then reinstall?
Thank you!!Kern --

Let's go GreenThis email contains 100% recycled electrons.

   
   From: Adrian Ball <user-81c4e435572d@xymon.invalid>
 To: xymon at xymon.com 
 Sent: Wednesday, September 27, 2017 6:19 AM
 Subject: Re: [Xymon] First time installed, and set up xymon, failed, NEED helps please.
  
Looks more like an Apache config problem than Xymon. Do you have FollowSymLinks set?e.g.DocumentRoot "/var/www/html"<Directory "/var/www/html">
  Options Indexes FollowSymLinks MultiViews
  AllowOverride None
  Require all granted

</Directory>Then I would take a look at the apache error log, it's usually pretty helpful in pointing out what the problem is.— Adrian Ball || user-81c4e435572d@xymon.invalid|| http://www.hp5.co.uk/Tel: XXXXX XXXXXX || Yahoo/AIM/MSN: adeatwollaton Mobile: XXXXX XXXXXX || http://www.facebook.com/ adrian.ball3______________________________ 
http://lists.xymon.com/


http://lists.xymon.com/
list Stephen Carville · Wed, 27 Sep 2017 13:09:14 -0700 ·
All I had to do was add this line to httpd.conf:

Include /var/xymon/server/etc/xymon-apache.conf

Then restarted httpd.
quoted from Kern Doe

On Wed, Sep 27, 2017 at 3:39 PM, Kern Doe <user-878ab27f72eb@xymon.invalid> wrote:
Hello,
I've reinstalled xymon with following steps:
1) unpack the downloaded xymon binary version 4.3.28 in /tmp        (as
root)
2) run configure script                            (as root)
    A few info to note:
        used mostly default values including
            group-ID=nobody
             IP-address of this host = 172.20.10.5

3) run: make                                (as root)
4) run: make install                            (as root)

5) Notes from xymon after the installation
    You must configure your webserver for the Xymon webpages and
CGI-scripts.
    A sample Apache configuration is in /home/xymon/server/etc/xymon-
apache.conf
    If you have your Administration CGI scripts in a separate directory,
    then you must also setup the password-file with the htpasswd command.

    To start Xymon, as the xymon user run '/home/xymon/server/bin/xymon.sh
start'
    To view the Xymon webpages, go to http://centos_hp0/xymon

 I'm kind of pausing at "You must configure your webserver for the Xymon
webpages and CGI-scripts"...
 Any additional help is greatly appreciated.
Kern --
-- 

Stephen Carville
Serf Without Portfolio
XXX.XXX.XXXX x1326
user-45c5e542adfd@xymon.invalid
There is no "I" in Team but there is in Integrity.
list Kern Doe · Wed, 27 Sep 2017 20:10:38 +0000 (UTC) ·
I'm going to try your suggestion Bruce...Thanks
quoted from Bruce Ferrell
    Let's go GreenThis email contains 100% recycled electrons.

      From: Bruce Ferrell <user-24fbf1912cfe@xymon.invalid>
 To: xymon at xymon.com; user-878ab27f72eb@xymon.invalid 
 Sent: Tuesday, September 26, 2017 6:54 PM
 Subject: Re: [Xymon] First time installed, and set up xymon, failed, NEED helps please.
   
Apache, out of the box, will not follow symlinks.

In your source tree look for xymon-apache.conf and put it into /etc/httpd/conf.d  then restart apache


On 09/26/2017 01:57 PM, Kern Doe via Xymon wrote:
list Josh Luthman · Wed, 27 Sep 2017 16:11:11 -0400 ·
That looks right, Stephen,

You *DO NOT* want to replace /etc/httpd/conf/httpd.conf with the xymon
config like you did!  You need to do an Include or copy the configuration
within it.
quoted from Kern Doe


Josh Luthman
Office: XXX-XXX-XXXX
Direct: XXX-XXX-XXXX
XXXX Wayne St
Suite XXXX
Troy, OH XXXXX

On Wed, Sep 27, 2017 at 4:09 PM, Stephen Carville <user-6ec031efcf79@xymon.invalid>
quoted from Stephen Carville
wrote:
All I had to do was add this line to httpd.conf:

Include /var/xymon/server/etc/xymon-apache.conf

Then restarted httpd.

On Wed, Sep 27, 2017 at 3:39 PM, Kern Doe <user-878ab27f72eb@xymon.invalid> wrote:
Hello,
I've reinstalled xymon with following steps:
1) unpack the downloaded xymon binary version 4.3.28 in /tmp        (as
root)
2) run configure script                            (as root)
    A few info to note:
        used mostly default values including
            group-ID=nobody
             IP-address of this host = 172.20.10.5

3) run: make                                (as root)
4) run: make install                            (as root)

5) Notes from xymon after the installation
    You must configure your webserver for the Xymon webpages and
CGI-scripts.
    A sample Apache configuration is in /home/xymon/server/etc/xymon-
apache.conf
    If you have your Administration CGI scripts in a separate directory,
    then you must also setup the password-file with the htpasswd command.

    To start Xymon, as the xymon user run '/home/xymon/server/bin/xymon.
sh
start'
    To view the Xymon webpages, go to http://centos_hp0/xymon

 I'm kind of pausing at "You must configure your webserver for the Xymon
webpages and CGI-scripts"...
 Any additional help is greatly appreciated.
Kern --
--
Stephen Carville
Serf Without Portfolio
XXX.XXX.XXXX x1326
user-45c5e542adfd@xymon.invalid
There is no "I" in Team but there is in Integrity.

list Kern Doe · Wed, 27 Sep 2017 20:43:07 +0000 (UTC) ·
OK, so I included xymon-apache.conf in file httpd.conf:
    head -5 /etc/httpd/conf/httpd.conf    include /home/xymon/server/etc/xymon-apache.conf
    #
    # This is the main Apache server configuration file.  It contains the
    # configuration directives that give the server its instructions.
    # See <URL:http://httpd.apache.org/docs/2.2/>; for detailed information.


I restarted httpd
    service httpd restart
    Stopping httpd:                                            [FAILED]
    Starting httpd: httpd: Syntax error on line 1 of /etc/httpd/conf/httpd.conf: Could not open configuration file     /home/xymon/server/etc/xymon-apache.conf: Permission denied
                                                                       [FAILED]
    [root at centos_hp0 server]# ls -alt /home/xymon/server/etc/xymon-apache.conf
    -rw-r--r--. 1 xymon xymon 5495 Sep 27 15:28 /home/xymon/server/etc/xymon-apache.conf
quoted from Josh Luthman


  Let's go GreenThis email contains 100% recycled electrons.

      From: Josh Luthman <user-4c45a83f15cb@xymon.invalid>
 To: Stephen Carville <user-6ec031efcf79@xymon.invalid> 
Cc: "xymon at xymon.com" <xymon at xymon.com>
 Sent: Wednesday, September 27, 2017 4:11 PM
 Subject: Re: [Xymon] First time installed, and set up xymon, failed, NEED helps please.
   
That looks right, Stephen,
You *DO NOT* want to replace /etc/httpd/conf/httpd.conf with the xymon config like you did!  You need to do an Include or copy the configuration within it.

Josh Luthman
Office: XXX-XXX-XXXX
Direct: XXX-XXX-XXXX
XXXX Wayne St
Suite XXXX
Troy, OH XXXXX
On Wed, Sep 27, 2017 at 4:09 PM, Stephen Carville <user-6ec031efcf79@xymon.invalid> wrote:

All I had to do was add this line to httpd.conf:

Include /var/xymon/server/etc/xymon- apache.conf
quoted from Josh Luthman

Then restarted httpd.

On Wed, Sep 27, 2017 at 3:39 PM, Kern Doe <user-878ab27f72eb@xymon.invalid> wrote:
Hello,
I've reinstalled xymon with following steps:
1) unpack the downloaded xymon binary version 4.3.28 in /tmp        (as
root)
2) run configure script                            (as root)
     A few info to note:
         used mostly default values including
             group-ID=nobody
              IP-address of this host = 172.20.10.5

3) run: make                                (as root)
4) run: make install                            (as root)

5) Notes from xymon after the installation
     You must configure your webserver for the Xymon webpages and
CGI-scripts.
     A sample Apache configuration is in /home/xymon/server/etc/xymon-
apache.conf
     If you have your Administration CGI scripts in a separate directory,
     then you must also setup the password-file with the htpasswd command.

     To start Xymon, as the xymon user run '/home/xymon/server/bin/xymon. sh
start'
     To view the Xymon webpages, go to http://centos_hp0/xymon

  I'm kind of pausing at "You must configure your webserver for the Xymon
webpages and CGI-scripts"...
  Any additional help is greatly appreciated.
Kern --
--
Stephen Carville
Serf Without Portfolio
XXX.XXX.XXXX x1326
user-45c5e542adfd@xymon.invalid
------------------------------ -------------------
There is no "I" in Team but there is in Integrity.


http://lists.xymon.com/
list Stephen Carville · Wed, 27 Sep 2017 13:59:01 -0700 ·
quoted from Kern Doe
On 09/27/2017 01:43 PM, Kern Doe wrote:
OK, so I included xymon-apache.conf in file httpd.conf:
    head -5 /etc/httpd/conf/httpd.conf    include /home/xymon/server/etc/xymon-apache.conf
    #
    # This is the main Apache server configuration file.  It contains the
    # configuration directives that give the server its instructions.
    # See <URL:http://httpd.apache.org/docs/2.2/>; for detailed information.
It is usually better to put Include directives at the end of httpd.conf:
quoted from Kern Doe

-- 
Stephen Carville
Serf Without Portfolio
XXX.XXX.XXXX x1326
user-45c5e542adfd@xymon.invalid
There is no "I" in Team but there is in Integrity.
list Kern Doe · Wed, 27 Sep 2017 21:06:44 +0000 (UTC) ·
OK, I put it at the end of httpd.conf file, still failed:Starting httpd: httpd: Syntax error on line 1137 of /etc/httpd/conf/httpd.conf: Could not open configuration file /home/xymon/server/etc/xymon-apache.conf: Permission denied
                                                           [FAILED]

I put a copy of xymon-apache.conf in /tmp, it also failed me:Starting httpd: httpd: Syntax error on line 1137 of /etc/httpd/conf/httpd.conf: Could not open configuration file /tmp/xymon-apache.conf: Permission denied
                                                           [FAILED]
quoted from Stephen Carville

    Let's go GreenThis email contains 100% recycled electrons.

      From: Stephen Carville <user-6ec031efcf79@xymon.invalid>
 To: "xymon at xymon.com" <xymon at xymon.com> 
 Sent: Wednesday, September 27, 2017 4:59 PM
 Subject: Re: [Xymon] First time installed, and set up xymon, failed, NEED helps please.
   
On 09/27/2017 01:43 PM, Kern Doe wrote:
OK, so I included xymon-apache.conf in file httpd.conf:
    head -5 /etc/httpd/conf/httpd.conf    include /home/xymon/server/etc/xymon-apache.conf
    #
    # This is the main Apache server configuration file.  It contains the
    # configuration directives that give the server its instructions.
    # See <URL:http://httpd.apache.org/docs/2.2/>; for detailed information.
It is usually better to put Include directives at the end of httpd.conf:

-- 
Stephen Carville
Serf Without Portfolio
XXX.XXX.XXXX x1326
user-45c5e542adfd@xymon.invalid
There is no "I" in Team but there is in Integrity.
list Paul Root · Wed, 27 Sep 2017 21:14:02 +0000 ·
I missed some of this thread, but don’t I remember that this is CentOS 6?


In that case, you should just put the xymon-apache.conf file in /etc/httpd/conf.d

Otherwise, if that’s not possible, for this error, this sounds like root can’t get to th /home/xymon/server/etc directory, or that file. Permissions, possibly selinux? Are you running selinux?
quoted from Kern Doe

From: Kern Doe [mailto:user-878ab27f72eb@xymon.invalid]
Sent: Wednesday, September 27, 2017 4:07 PM
To: Stephen Carville; xymon at xymon.com
Subject: Re: [Xymon] First time installed, and set up xymon, failed, NEED helps please.

OK, I put it at the end of httpd.conf file, still failed:
Starting httpd: httpd: Syntax error on line 1137 of /etc/httpd/conf/httpd.conf: Could not open configuration file /home/xymon/server/etc/xymon-apache.conf: Permission denied
                                                           [FAILED]

I put a copy of xymon-apache.conf in /tmp, it also failed me:
quoted from Kern Doe
Starting httpd: httpd: Syntax error on line 1137 of /etc/httpd/conf/httpd.conf: Could not open configuration file /tmp/xymon-apache.conf: Permission denied
                                                           [FAILED]


Let's go Green
This email contains 100% recycled electrons.

From: Stephen Carville <user-6ec031efcf79@xymon.invalid<mailto:user-6ec031efcf79@xymon.invalid>>
To: "xymon at xymon.com<mailto:xymon at xymon.com>" <xymon at xymon.com<mailto:xymon at xymon.com>>
Sent: Wednesday, September 27, 2017 4:59 PM
Subject: Re: [Xymon] First time installed, and set up xymon, failed, NEED helps please.

On 09/27/2017 01:43 PM, Kern Doe wrote:
OK, so I included xymon-apache.conf in file httpd.conf:
    head -5 /etc/httpd/conf/httpd.conf    include /home/xymon/server/etc/xymon-apache.conf
    #
    # This is the main Apache server configuration file.  It contains the
    # configuration directives that give the server its instructions.
    # See <URL:http://httpd.apache.org/docs/2.2/>; for detailed information.
It is usually better to put Include directives at the end of httpd.conf:


--
Stephen Carville
Serf Without Portfolio
XXX.XXX.XXXX x1326

user-45c5e542adfd@xymon.invalid<mailto:user-45c5e542adfd@xymon.invalid>
There is no "I" in Team but there is in Integrity.


This communication is the property of CenturyLink and may contain confidential or privileged information. Unauthorized use of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments.
list Stephen Carville · Wed, 27 Sep 2017 14:44:32 -0700 ·
quoted from Kern Doe
On 09/27/2017 02:06 PM, Kern Doe wrote:
OK, I put it at the end of httpd.conf file, still failed:Starting httpd: httpd: Syntax error on line 1137 of /etc/httpd/conf/httpd.conf: Could not open configuration file /home/xymon/server/etc/xymon-apache.conf: Permission denied
                                                           [FAILED]

I put a copy of xymon-apache.conf in /tmp, it also failed me:Starting httpd: httpd: Syntax error on line 1137 of /etc/httpd/conf/httpd.conf: Could not open configuration file /tmp/xymon-apache.conf: Permission denied
                                                           [FAILED]
That sounds suspiciously like a selinux prolblem.  You could try turning
it off temporarily:

$ sudo setenforce 0

then start/restart apache

If that works you will have to fix the selinux problem.
quoted from Paul Root
    Let's go GreenThis email contains 100% recycled electrons.

      From: Stephen Carville <user-6ec031efcf79@xymon.invalid>
 To: "xymon at xymon.com" <xymon at xymon.com> 
 Sent: Wednesday, September 27, 2017 4:59 PM
 Subject: Re: [Xymon] First time installed, and set up xymon, failed, NEED helps please.
   
On 09/27/2017 01:43 PM, Kern Doe wrote:
OK, so I included xymon-apache.conf in file httpd.conf:
    head -5 /etc/httpd/conf/httpd.conf    include /home/xymon/server/etc/xymon-apache.conf
    #
    # This is the main Apache server configuration file.  It contains the
    # configuration directives that give the server its instructions.
    # See <URL:http://httpd.apache.org/docs/2.2/>; for detailed information.
It is usually better to put Include directives at the end of httpd.conf:
-- 
Stephen Carville
Serf Without Portfolio
XXX.XXX.XXXX x1326
user-45c5e542adfd@xymon.invalid
There is no "I" in Team but there is in Integrity.
list Kern Doe · Wed, 27 Sep 2017 21:49:46 +0000 (UTC) ·
Everyone was right on followings:
    added this line at the bottom of file /etc/httpd/conf/httpd.conf:
        include /home/xymon/server/etc/xymon-apache.conf 

and Paul Root was right about Selinux, so I did:

    modified file /etc/sysconfig/selinux 
        #SELINUX=enforcing      KERN testing ....
        SELINUX=permissive
    rebooted.

it works now!!!
Thank you!!!I can go home and feel good, will do more learning tomorrow :)
quoted from Kern Doe
    Let's go GreenThis email contains 100% recycled electrons.

      From: Kern Doe <user-878ab27f72eb@xymon.invalid>
 To: Kern Doe <user-878ab27f72eb@xymon.invalid>; Adrian Ball <user-81c4e435572d@xymon.invalid>; "xymon at xymon.com" <xymon at xymon.com>; "user-87556346d4af@xymon.invalid" <user-87556346d4af@xymon.invalid>; "user-4c45a83f15cb@xymon.invalid" <user-4c45a83f15cb@xymon.invalid>; "user-24fbf1912cfe@xymon.invalid" <user-24fbf1912cfe@xymon.invalid> 
 Sent: Wednesday, September 27, 2017 3:39 PM
 Subject: Re: [Xymon] First time installed, and set up xymon, failed, NEED helps please.
   
Hello, 
I've reinstalled xymon with following steps:1) unpack the downloaded xymon binary version 4.3.28 in /tmp        (as root)
2) run configure script                            (as root)
    A few info to note: 
        used mostly default values including 
            group-ID=nobody
             IP-address of this host = 172.20.10.5

3) run: make                                (as root)
4) run: make install                            (as root)

5) Notes from xymon after the installation
    You must configure your webserver for the Xymon webpages and CGI-scripts.
    A sample Apache configuration is in /home/xymon/server/etc/xymon-apache.conf
    If you have your Administration CGI scripts in a separate directory,
    then you must also setup the password-file with the htpasswd command.

    To start Xymon, as the xymon user run '/home/xymon/server/bin/xymon.sh start'
    To view the Xymon webpages, go to http://centos_hp0/xymon

 I'm kind of pausing at "You must configure your webserver for the Xymon webpages and CGI-scripts"... Any additional help is greatly appreciated.Kern --
  Let's go GreenThis email contains 100% recycled electrons.

      From: Kern Doe via Xymon <xymon at xymon.com>
 To: Adrian Ball <user-81c4e435572d@xymon.invalid>; "xymon at xymon.com" <xymon at xymon.com>; "user-87556346d4af@xymon.invalid" <user-87556346d4af@xymon.invalid>; "user-4c45a83f15cb@xymon.invalid" <user-4c45a83f15cb@xymon.invalid>; "user-24fbf1912cfe@xymon.invalid" <user-24fbf1912cfe@xymon.invalid>; "xymon at xymon.com" <xymon at xymon.com> 
 Sent: Wednesday, September 27, 2017 1:12 PM
 Subject: Re: [Xymon] First time installed, and set up xymon, failed, NEED helps please.
  
I thank to everyone who has replied to my email, if I miss anyone, I do apologize.
Ok, so I've got super confused and you know what, I'm going to start everything all over fresh and clean -- that way, I can document it as I go along. I will do followings:1) shutdown xymon, and apache
2) I will even remove xymon ID and recreate it.3) keep /etc/hosts.cfg        cat /etc/hosts.cfg                172.20.10.5   centos_hp0      # bbd http://centos_hp0/
 4) remove xymon's stuff in /etc/httpd/conf.d5) keep my test file for testing apache: /var/www/html/index.html
                    cat index.html
                                    Welcome to Kern's webserver
        (sorry, I'm a real novice with apache since I'm a DBA)

6) anything else should I do as parts of trying to uninstall xymon, then reinstall?
Thank you!!Kern --

Let's go GreenThis email contains 100% recycled electrons.

   
   From: Adrian Ball <user-81c4e435572d@xymon.invalid>
 To: xymon at xymon.com 
 Sent: Wednesday, September 27, 2017 6:19 AM
 Subject: Re: [Xymon] First time installed, and set up xymon, failed, NEED helps please.
  
Looks more like an Apache config problem than Xymon. Do you have FollowSymLinks set?e.g.DocumentRoot "/var/www/html"<Directory "/var/www/html">
  Options Indexes FollowSymLinks MultiViews
  AllowOverride None
  Require all granted
</Directory>Then I would take a look at the apache error log, it's usually pretty helpful in pointing out what the problem is.— Adrian Ball || user-81c4e435572d@xymon.invalid|| http://www.hp5.co.uk/Tel: XXXXX XXXXXX || Yahoo/AIM/MSN: adeatwollaton Mobile: XXXXX XXXXXX || http://www.facebook.com/adrian.ball3

list Schminke_Erik_D · Thu, 28 Sep 2017 09:00:27 -0500 ·
*****PLEASE***** do NOT leave SELinux in permissive mode.  (
http://stopdisablingselinux.com/)

I have beat SELinux into submission to make Xymon work the way I need it
to.  You can do the same by following my procedure below, or from watching
Thomas Cameron's lecture from RedHat Summit a couple years ago "SELinux For
Mere Mortals" (https://www.youtube.com/watch?v=cNoVgDqqJmM)  I built mine
from the tips given in this video.

As root:
#> setsebool -P httpd_enable_homedirs on
#> setsebool -P httpd_read_user_content on

A few things can't be done for Xymon by simply changing SELinux booleans.
I've curated a number of SELinux policy exceptions over the past couple
years in order to make Xymon and SELinux play nice together.  You can
create yours by doing this:

## vvvvvv ---- copy everything below this line ---- vvvvvv ##
module xymon 1.0;

require {
	type unconfined_t;
	type var_log_t;
	type initrc_t;
	type admin_home_t;
	type httpd_t;
	type user_home_t;
	type fonts_cache_t;
	type port_t;
	class tcp_socket name_connect;
	class file { rename execute setattr read create execute_no_trans
write getattr unlink open };
	class sock_file write;
	class lnk_file { create unlink };
	class unix_dgram_socket sendto;
	class dir { write rmdir setattr remove_name create add_name };
}

#============= httpd_t ==============
allow httpd_t admin_home_t:file { read getattr open };
allow httpd_t fonts_cache_t:dir setattr;
allow httpd_t initrc_t:unix_dgram_socket sendto;
allow httpd_t port_t:tcp_socket name_connect;
allow httpd_t unconfined_t:unix_dgram_socket sendto;
allow httpd_t user_home_t:dir rmdir;
allow httpd_t user_home_t:dir { write remove_name create add_name };
allow httpd_t user_home_t:file setattr;
allow httpd_t user_home_t:file { rename write execute create unlink
execute_no_trans };
allow httpd_t user_home_t:lnk_file { create unlink };
allow httpd_t user_home_t:sock_file write;
allow httpd_t var_log_t:file read;
EOF
## ^^^^^ ---- to everything above this line ---- ^^^^^^ ##

Paste what you've copied into a file-- doesn't matter where; I've used the
name "xymon.te"
#> vi xymon.te

Run the following commands to build the SELinux policy module:
#> checkmodule -M -m -o xymon.mod xymon.te
#> semodule_package -m xymon.mod -o xymon.pp

Run this command to install the policy module.
#> semodule -i xymon.pp

Change your /etc/sysconfig/selinux back to "enforcing".
Reboot.

If you see any funkiness, watch /var/log/audit/audit.log for AVC denials.

#> grep type=AVC /var/log/audit/audit.log | grep denied

If you see anything in there, it means it's time to "build a policy
exception" not "disable SELinux".
quoted from Kern Doe


Everyone was right on followings:
    added this line at the bottom of file /etc/httpd/conf/httpd.conf:
        include /home/xymon/server/etc/xymon-apache.conf

and Paul Root was right about Selinux, so I did:

    modified file /etc/sysconfig/selinux
        #SELINUX=enforcing      KERN testing ....
        SELINUX=permissive
    rebooted.

it works now!!!
Thank you!!!I can go home and feel good, will do more learning tomorrow :)
    Let's go GreenThis email contains 100% recycled electrons.


Erik D. Schminke | Associate Systems Programmer
Hormel Foods Corporation | One Hormel Place | Austin, MN XXXXX
Phone: (XXX) XXX-XXXX
user-15513f33c451@xymon.invalid | www.hormelfoods.com
list Schminke_Erik_D · Thu, 28 Sep 2017 09:19:52 -0500 ·
Yuck... I neglected to remove the extraneous "EOF" I included at the end of
the xymon.te file.  That will produce an error.

Remove that line and re-save.
quoted from Schminke_Erik_D

Erik D. Schminke | Associate Systems Programmer
Hormel Foods Corporation | One Hormel Place | Austin, MN XXXXX
Phone: (XXX) XXX-XXXX
user-15513f33c451@xymon.invalid | www.hormelfoods.com
list Kern Doe · Thu, 28 Sep 2017 14:27:32 +0000 (UTC) ·
Thank you Ed, I will document this! (without EOF :)    Let's go GreenThis email contains 100% recycled electrons.
quoted from Schminke_Erik_D

      From: "user-15513f33c451@xymon.invalid" <user-15513f33c451@xymon.invalid>
 To: xymon at xymon.com; user-878ab27f72eb@xymon.invalid 
 Sent: Thursday, September 28, 2017 10:00 AM
 Subject: Re: [Xymon] First time installed, and set up xymon, failed, NEED helps please.
   

*****PLEASE***** do NOT leave SELinux in permissive mode.  (
http://stopdisablingselinux.com/)

I have beat SELinux into submission to make Xymon work the way I need it
to.  You can do the same by following my procedure below, or from watching
Thomas Cameron's lecture from RedHat Summit a couple years ago "SELinux For
Mere Mortals" (https://www.youtube.com/watch?v=cNoVgDqqJmM)  I built mine
from the tips given in this video.

As root:
#> setsebool -P httpd_enable_homedirs on
#> setsebool -P httpd_read_user_content on

A few things can't be done for Xymon by simply changing SELinux booleans.
I've curated a number of SELinux policy exceptions over the past couple
years in order to make Xymon and SELinux play nice together.  You can
create yours by doing this:

## vvvvvv ---- copy everything below this line ---- vvvvvv ##
module xymon 1.0;

require {
    type unconfined_t;
    type var_log_t;
    type initrc_t;
    type admin_home_t;
    type httpd_t;
    type user_home_t;
    type fonts_cache_t;
    type port_t;
    class tcp_socket name_connect;
    class file { rename execute setattr read create execute_no_trans
write getattr unlink open };
    class sock_file write;
    class lnk_file { create unlink };
    class unix_dgram_socket sendto;
    class dir { write rmdir setattr remove_name create add_name };
}

#============= httpd_t ==============
allow httpd_t admin_home_t:file { read getattr open };
allow httpd_t fonts_cache_t:dir setattr;
allow httpd_t initrc_t:unix_dgram_socket sendto;
allow httpd_t port_t:tcp_socket name_connect;
allow httpd_t unconfined_t:unix_dgram_socket sendto;
allow httpd_t user_home_t:dir rmdir;
allow httpd_t user_home_t:dir { write remove_name create add_name };
allow httpd_t user_home_t:file setattr;
allow httpd_t user_home_t:file { rename write execute create unlink
execute_no_trans };
allow httpd_t user_home_t:lnk_file { create unlink };
allow httpd_t user_home_t:sock_file write;
allow httpd_t var_log_t:file read;
EOF
## ^^^^^ ---- to everything above this line ---- ^^^^^^ ##

Paste what you've copied into a file-- doesn't matter where; I've used the
name "xymon.te"
#> vi xymon.te

Run the following commands to build the SELinux policy module:
#> checkmodule -M -m -o xymon.mod xymon.te
#> semodule_package -m xymon.mod -o xymon.pp

Run this command to install the policy module.
#> semodule -i xymon.pp

Change your /etc/sysconfig/selinux back to "enforcing".
Reboot.

If you see any funkiness, watch /var/log/audit/audit.log for AVC denials.

#> grep type=AVC /var/log/audit/audit.log | grep denied

If you see anything in there, it means it's time to "build a policy
exception" not "disable SELinux".


Everyone was right on followings:
    added this line at the bottom of file /etc/httpd/conf/httpd.conf:
        include /home/xymon/server/etc/xymon-apache.conf

and Paul Root was right about Selinux, so I did:

    modified file /etc/sysconfig/selinux
        #SELINUX=enforcing      KERN testing ....
        SELINUX=permissive
    rebooted.

it works now!!!
Thank you!!!I can go home and feel good, will do more learning tomorrow :)
    Let's go GreenThis email contains 100% recycled electrons.


Erik D. Schminke | Associate Systems Programmer
Hormel Foods Corporation | One Hormel Place | Austin, MN XXXXX
Phone: (XXX) XXX-XXXX

user-15513f33c451@xymon.invalid | www.hormelfoods.com