Xymon Mailing List Archive search

Web server or hobbit?

6 messages in this thread

list Vernon Everett · Fri, 21 Jul 2006 13:09:59 +0800 ·
Hi all

I am installing a new Hobbit server, running 4.1.2p1 on Solaris 10 with
Apache 2.2.0
It's starting to look good. I get the main hobbit page come up, and many
green faces smiling at me.
However, whenever I click on a face, or any menu option that runs a
script, my browser opens a dialogue box and wants to start a download.
:-(

When I go to the Hobbit home page with the same browser, it all works
OK, so I am certain it's either a stuff-up with my Hobbit install, or an
Apache server config problem.
Everything in the ~hobbit/cgi-* is readable and executable by all.

What's happening here? Have I missed something?

Regards
    Vernon
list Kolbjørn Barmen · Fri, 21 Jul 2006 07:31:55 +0200 (CEST) ·
quoted from Vernon Everett
On Fri, 21 Jul 2006, Everett, Vernon wrote:
Hi all

I am installing a new Hobbit server, running 4.1.2p1 on Solaris 10 with
Apache 2.2.0
It's starting to look good. I get the main hobbit page come up, and many
green faces smiling at me.
However, whenever I click on a face, or any menu option that runs a
script, my browser opens a dialogue box and wants to start a download.

:-(
quoted from Vernon Everett

When I go to the Hobbit home page with the same browser, it all works
OK, so I am certain it's either a stuff-up with my Hobbit install, or an
Apache server config problem.
Everything in the ~hobbit/cgi-* is readable and executable by all.

What's happening here? Have I missed something?
You need to configure apache so that it knows that the cgi directories are
indeed just that :)

Something like this

   ScriptAlias /hobbit-cgi/ "/usr/lib/hobbit/cgi-bin/"
   <Directory "/usr/lib/hobbit/cgi-bin">
       AllowOverride None
       Options ExecCGI Includes
   </Directory>
   ScriptAlias /hobbit-seccgi/ "/usr/lib/hobbit/cgi-secure/"
   <Directory "/usr/lib/hobbit/cgi-secure">
       AllowOverride None
       Options ExecCGI Includes
   </Directory>


-- 
Kolbjørn Barmen
UNINETT Driftsenter
list Vernon Everett · Fri, 21 Jul 2006 13:45:31 +0800 ·
Yep, I got that.
Took what what generated in the ~hobbit/server/etc/hobbit-apache.conf and tacked it on the end of the httpd.conf.
(This has always worked for me in the past)
See below for settings.

Regards
   Vernon

--- from httpd.conf ---
# NB: The "Alias" line below must NOT be used if you have
#     the Hobbit webfiles as the root URL. In that case,
#     you should instead set this:
#
#          DocumentRoot /export/home/hobbit//server/www

Alias /hobbit/  "/export/home/hobbit/server/www/"
<Directory "/export/home/hobbit/server/www">
    Options Indexes FollowSymLinks Includes MultiViews
    Order allow,deny
    Allow from all
</Directory>

ScriptAlias /hobbit-cgi/ "/export/home/hobbit/cgi-bin/"
<Directory "/export/home/hobbit/cgi-bin">
    AllowOverride None
    Options ExecCGI Includes
    Order allow,deny
    Allow from all
</Directory>

ScriptAlias /hobbit-seccgi/ "/export/home/hobbit/cgi-secure/"
<Directory "/export/home/hobbit/cgi-secure">
    AllowOverride None
    Options ExecCGI Includes
    Order allow,deny
    Allow from all

    # Password file where users with access to these scripts are kept.
    # Create it with "htpasswd -c /export/home/hobbit/server/etc/hobbitpasswd USERNAME"
    # Add more users / change passwords with "htpasswd /export/home/hobbit/server/etc/hobbitpasswd USERNAME"

    AuthUserFile /export/home/hobbit/server/etc/hobbitpasswd
    AuthType Basic
    AuthName "Hobbit Administration"
    Require valid-user
</Directory

--- End ---
quoted from Kolbjørn Barmen


-----Original Message-----
From: user-5623b4f246b3@xymon.invalid [mailto:user-5623b4f246b3@xymon.invalid] 
Sent: Friday, 21 July 2006 1:32 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] Web server or hobbit?

On Fri, 21 Jul 2006, Everett, Vernon wrote:
Hi all

I am installing a new Hobbit server, running 4.1.2p1 on Solaris 10 
with Apache 2.2.0 It's starting to look good. I get the main hobbit 
page come up, and many green faces smiling at me.
However, whenever I click on a face, or any menu option that runs a 
script, my browser opens a dialogue box and wants to start a download.

:-(
quoted from Kolbjørn Barmen

When I go to the Hobbit home page with the same browser, it all works 
OK, so I am certain it's either a stuff-up with my Hobbit install, or 
an Apache server config problem.
Everything in the ~hobbit/cgi-* is readable and executable by all.

What's happening here? Have I missed something?
You need to configure apache so that it knows that the cgi directories are indeed just that :)

Something like this

   ScriptAlias /hobbit-cgi/ "/usr/lib/hobbit/cgi-bin/"
   <Directory "/usr/lib/hobbit/cgi-bin">
       AllowOverride None
       Options ExecCGI Includes
   </Directory>
   ScriptAlias /hobbit-seccgi/ "/usr/lib/hobbit/cgi-secure/"
   <Directory "/usr/lib/hobbit/cgi-secure">
       AllowOverride None
       Options ExecCGI Includes
   </Directory>


--
Kolbjørn Barmen
UNINETT Driftsenter
list Vernon Everett · Fri, 21 Jul 2006 14:19:17 +0800 ·
Some extra info
When I right-click on a face icon, I get the Address as 
http://10.1.14.84/hobbit-cgi/bb-hostsvc.sh?HOSTSVC=shire.bbgen&IP=127.0.0.1&DISPLAYNAME=shire

Doing the same on the column descriptions gives me an Address of 
http://10.1.14.84/hobbit-cgi/hobbitcolumn.sh?hobbitd

Anybody see anything odd in that?

Regards
   Vernon
quoted from Vernon Everett


-----Original Message-----
From: Everett, Vernon [mailto:user-36f80bd657a9@xymon.invalid] 
Sent: Friday, 21 July 2006 1:46 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] Web server or hobbit?

Yep, I got that.
Took what what generated in the ~hobbit/server/etc/hobbit-apache.conf and tacked it on the end of the httpd.conf.
(This has always worked for me in the past) See below for settings.

Regards
   Vernon

--- from httpd.conf ---
# NB: The "Alias" line below must NOT be used if you have
#     the Hobbit webfiles as the root URL. In that case,
#     you should instead set this:
#
#          DocumentRoot /export/home/hobbit//server/www

Alias /hobbit/  "/export/home/hobbit/server/www/"
<Directory "/export/home/hobbit/server/www">
    Options Indexes FollowSymLinks Includes MultiViews
    Order allow,deny
    Allow from all
</Directory>

ScriptAlias /hobbit-cgi/ "/export/home/hobbit/cgi-bin/"
<Directory "/export/home/hobbit/cgi-bin">
    AllowOverride None
    Options ExecCGI Includes
    Order allow,deny
    Allow from all
</Directory>

ScriptAlias /hobbit-seccgi/ "/export/home/hobbit/cgi-secure/"
<Directory "/export/home/hobbit/cgi-secure">
    AllowOverride None
    Options ExecCGI Includes
    Order allow,deny
    Allow from all

    # Password file where users with access to these scripts are kept.
    # Create it with "htpasswd -c /export/home/hobbit/server/etc/hobbitpasswd USERNAME"
    # Add more users / change passwords with "htpasswd /export/home/hobbit/server/etc/hobbitpasswd USERNAME"

    AuthUserFile /export/home/hobbit/server/etc/hobbitpasswd
    AuthType Basic
    AuthName "Hobbit Administration"
    Require valid-user
</Directory

--- End ---


-----Original Message-----
From: user-5623b4f246b3@xymon.invalid [mailto:user-5623b4f246b3@xymon.invalid]
Sent: Friday, 21 July 2006 1:32 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] Web server or hobbit?

On Fri, 21 Jul 2006, Everett, Vernon wrote:
Hi all

I am installing a new Hobbit server, running 4.1.2p1 on Solaris 10 
with Apache 2.2.0 It's starting to look good. I get the main hobbit 
page come up, and many green faces smiling at me.
However, whenever I click on a face, or any menu option that runs a 
script, my browser opens a dialogue box and wants to start a download.

:-(
quoted from Vernon Everett

When I go to the Hobbit home page with the same browser, it all works 
OK, so I am certain it's either a stuff-up with my Hobbit install, or 
an Apache server config problem.
Everything in the ~hobbit/cgi-* is readable and executable by all.

What's happening here? Have I missed something?
You need to configure apache so that it knows that the cgi directories are indeed just that :)

Something like this

   ScriptAlias /hobbit-cgi/ "/usr/lib/hobbit/cgi-bin/"
   <Directory "/usr/lib/hobbit/cgi-bin">
       AllowOverride None
       Options ExecCGI Includes
   </Directory>
   ScriptAlias /hobbit-seccgi/ "/usr/lib/hobbit/cgi-secure/"
   <Directory "/usr/lib/hobbit/cgi-secure">
       AllowOverride None
       Options ExecCGI Includes
   </Directory>


--
Kolbjørn Barmen
UNINETT Driftsenter
list Henrik Størner · Fri, 21 Jul 2006 08:58:44 +0200 ·
quoted from Vernon Everett
On Fri, Jul 21, 2006 at 01:09:59PM +0800, Everett, Vernon wrote:
Hi all

I am installing a new Hobbit server, running 4.1.2p1 on Solaris 10 with
Apache 2.2.0
It's starting to look good. I get the main hobbit page come up, and many
green faces smiling at me.
However, whenever I click on a face, or any menu option that runs a
script, my browser opens a dialogue box and wants to start a download.

:-(
If you do download it, then what's in the file - a shell script, or 
an HTML document ?

If it's a shell script, then your cgi directories are not seen as such,
and you're just getting the shell script sent back to you as a plain
file. If it's an HTML document, then the CGI program runs and generates
the correct response - in that case, I suspect that your webserver
doesn't provide the right Content-type header, although the Hobbit CGI
programs all try their best to set this correctly.

If you've got something like "curl" installed then running 
   curl -i http://hobbit-cgi/..... |more
will show you the headers sent by the webserver. If you dont have that,
then you can just telnet to the webserver on port 80, and send it
   GET http://hobbit-cgi/.....
   <hit enter twice>


Regards,
Henrik
list Vernon Everett · Fri, 21 Jul 2006 15:18:30 +0800 ·
Hi Henrik (and others that helped)

I found the solution on this rather strange and obscure web site. :-)
http://www.hswn.dk/hobbiton/2006/01/msg00015.html
 
It's all fixed now.

Regards
    Vernon
quoted from Henrik Størner

-----Original Message-----
From: Henrik Stoerner [mailto:user-ce4a2c883f75@xymon.invalid] 
Sent: Friday, 21 July 2006 2:59 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] Web server or hobbit?

On Fri, Jul 21, 2006 at 01:09:59PM +0800, Everett, Vernon wrote:
Hi all

I am installing a new Hobbit server, running 4.1.2p1 on Solaris 10 
with Apache 2.2.0 It's starting to look good. I get the main hobbit 
page come up, and many green faces smiling at me.
However, whenever I click on a face, or any menu option that runs a 
script, my browser opens a dialogue box and wants to start a download.

:-(
quoted from Henrik Størner
If you do download it, then what's in the file - a shell script, or an
HTML document ?

If it's a shell script, then your cgi directories are not seen as such,
and you're just getting the shell script sent back to you as a plain
file. If it's an HTML document, then the CGI program runs and generates
the correct response - in that case, I suspect that your webserver
doesn't provide the right Content-type header, although the Hobbit CGI
programs all try their best to set this correctly.

If you've got something like "curl" installed then running 
   curl -i http://hobbit-cgi/..... |more will show you the headers sent
by the webserver. If you dont have that, then you can just telnet to the
webserver on port 80, and send it
   GET http://hobbit-cgi/.....
   <hit enter twice>


Regards,
Henrik