Xymon Mailing List Archive search

Xymon Digest, Vol 9, Issue 15

3 messages in this thread

list Yanni · Wed, 19 Oct 2011 15:58:10 +0200 (CEST) ·
​​Hi Jeremy
 
The reason I am using /opt/xymon is because I thought it would be a good idea to
keep everything related to xymon inside
/opt so that I will not have to look into different directories when I am
looking for any xymon files.

Please see the outputs below. I excluded the commented lines that contained the
words 'include' and 'Alias' from the outputs.
 

Output of:grep -i "alias" /etc/httpd/conf/*.conf

Alias /icons/ "/var/www/icons/"
Alias /error/ "/var/www/error/"
LoadModule authn_alias_module modules/mod_authn_alias.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule alias_module modules/mod_alias.so
 
Alias /icons/ "/var/www/icons/"
 
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
 
Alias /error/ "/var/www/error/"
 
Output of:  grep -i "include" /etc/httpd/conf/*.conf
 
LoadModule include_module modules/mod_include.so
Include conf.d/*.conf

AddOutputFilter INCLUDES .shtml

<IfModule mod_include.c>
        Options IncludesNoExec
        AddOutputFilter Includes html

 
I will try what you suggested. I will remove the content of xymon-apache.conf
from httpd.cond and then I will add
an 'include' line in httpd.conf like this:

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

I will try that and report back.

Many thanks
Yanni


On October 18, 2011 at 2:35 AM Jeremy Laidman <user-71895fb2e44c@xymon.invalid> wrote:
Yanni

Your egrep output doesn't show the "Alias" line 1011 of httpd.conf.
This is because my egrep was trying to be too clever and won't match
"Alias" at the start of a line.  The same would be true for "include"
directives.  Can you send what this shows:

   grep -i "alias" /etc/httpd/conf/*.conf
   grep -i "include" /etc/httpd/conf/*.conf

Is there a reason why you're using "/opt/xymon" in your URL path
instead of say "/xymon"?  My Alias command looks like this:

   Alias /xymon/ "/var/lib/xymon/www/"

I can't think why this would be a problem.  Just a curiosity.
From what you have shown, it seems you have defined ScriptAlias twice:
once in httpd.conf and once in xymon-apache.conf.  You should remove
all Xymon configuration from httpd.conf and instead let the settings
in xymon-apache.conf be taken by Apache when it includes the file.
You will have either "include *.conf" or "include xymon-apache.conf",
and so you don't need to add anything into httpd.conf.

Cheers
Jeremy​
list Jeremy Laidman · Thu, 20 Oct 2011 15:39:35 +1100 ·
On Thu, Oct 20, 2011 at 12:58 AM, Yanni
quoted from Yanni
<user-04b379562e0f@xymon.invalid> wrote:
Hi Jeremy

The reason I am using /opt/xymon is because I thought it would be a good
idea to keep everything related to xymon inside
/opt so that I will not have to look into different directories when I am
looking for any xymon files.
This is a good reason to put the _files_ into /opt/xymon/.  But URL
part of the alias/scriptalias is different.  For instance, you have
this in your ScriptAlias line:

ScriptAlias /opt/xymon/xymon-cgi/ "/opt/xymon/cgi-bin/"

This means the URL to access the CGI scripts would be
http://servername/opt/xymon/xymon-cgi/scriptname.  The "/opt/xymon"
part is not necessary, and I suspect that links within Xymon will not
use it.  Instead, you probably need to have this:

ScriptAlias /xymon-cgi/ "/opt/xymon/cgi-bin/"

In that way, the browser knows the URL path as /xymon-cgi/ but Apache
translates this to /opt/xymon/cgi-bin/.
quoted from Yanni
Please see the outputs below. I excluded the commented lines that contained
the words 'include' and 'Alias' from the outputs.
Thanks, the comments wouldn't help.

The grep output shows no "Alias /xymon/".  The first non-comment line
in my xymon-apache.conf file defines this.  I would imagine yours
should have:

Alias /xymon/ "/opt/xymon/www/"
Include conf.d/*.conf
This confirms that any .conf file inside the conf.d directory will
automatically get included in the config when Apache reloads.  Good.
quoted from Yanni
I will try what you suggested. I will remove the content of
xymon-apache.conf from httpd.cond and then I will add
an 'include' line in httpd.conf like this:

Include /opt/xymon/server/etc/xymon-apache.conf
No, don't add the include directive.  After removing the configuration
entries from httpd.conf, simply copy the file into conf.d.  For
example:
  cp /opt/xymon/server/etc/xymon-apache.conf /etc/httpd/conf.d/

Don't forget to restart Apache.

Cheers
Jeremy
list Yanni · Thu, 20 Oct 2011 12:22:38 +0200 (CEST) ·
Hi Jeremy
 
First of all, let me know if you ever visit london and the beers are on me.
 
I can see the initial xymon page :))) I can finally start adding hosts now and
use it.


I removed the entries from the apache-config file and copied the
xymon-apache.conf to etc/httpd/conf.d.
 
Restarted apache then typed servername/xymon and it worked.
 
When I copied xymon-apache.conf the file was already in /etc/httpd/conf.d
because I was prompted to overwrite it.
I don't know what I was doing wrong before. I guess I messed up the
apache-config file and not knowing much about it I
couldn't understand what was going on but since I am planning to use xymon I
should find some apache information and try to understand what each line means
and does.
 
Thank you very much for your detailed explanation to my posts and for the
HowTo's.
 
Many thanks
Yanni
 
 
 
I removed entries from http.conf andNo, don't add the include directive.  After
quoted from Jeremy Laidman
removing the configuration
entries from httpd.conf, simply copy the file into conf.d.  For
example:
   cp /opt/xymon/server/etc/xymon-apache.conf /etc/httpd/conf.d/
/etc/httpd/conf.d/
quoted from Jeremy Laidman
 

On October 20, 2011 at 6:39 AM Jeremy Laidman <user-71895fb2e44c@xymon.invalid> wrote:
On Thu, Oct 20, 2011 at 12:58 AM, Yanni
<user-04b379562e0f@xymon.invalid> wrote:
Hi Jeremy

The reason I am using /opt/xymon is because I thought it would be a good
idea to keep everything related to xymon inside
/opt so that I will not have to look into different directories when I am
looking for any xymon files.
This is a good reason to put the _files_ into /opt/xymon/.  But URL
part of the alias/scriptalias is different.  For instance, you have
this in your ScriptAlias line:

ScriptAlias /opt/xymon/xymon-cgi/ "/opt/xymon/cgi-bin/"

This means the URL to access the CGI scripts would be
http://servername/opt/xymon/xymon-cgi/scriptname.  The "/opt/xymon"
part is not necessary, and I suspect that links within Xymon will not
use it.  Instead, you probably need to have this:

ScriptAlias /xymon-cgi/ "/opt/xymon/cgi-bin/"

In that way, the browser knows the URL path as /xymon-cgi/ but Apache
translates this to /opt/xymon/cgi-bin/.
Please see the outputs below. I excluded the commented lines that contained
the words 'include' and 'Alias' from the outputs.
Thanks, the comments wouldn't help.

The grep output shows no "Alias /xymon/".  The first non-comment line
in my xymon-apache.conf file defines this.  I would imagine yours
should have:

Alias /xymon/ "/opt/xymon/www/"
Include conf.d/*.conf
This confirms that any .conf file inside the conf.d directory will
automatically get included in the config when Apache reloads.  Good.
I will try what you suggested. I will remove the content of
xymon-apache.conf from httpd.cond and then I will add
an 'include' line in httpd.conf like this:

Include /opt/xymon/server/etc/xymon-apache.conf
No, don't add the include directive.  After removing the configuration
entries from httpd.conf, simply copy the file into conf.d.  For
example:
   cp /opt/xymon/server/etc/xymon-apache.conf /etc/httpd/conf.d/

Don't forget to restart Apache.

Cheers
Jeremy