Xymon Mailing List Archive search

Problem with some hobbit manpages

5 messages in this thread

list Frédéric Mangeant · Mon, 14 Feb 2005 17:38:44 +0100 ·
Hi all

I'm not allowed to access any hobbit manpage whose name include "cgi" (for
example bb-hostsvc.cgi.1.html); it results in

[Mon Feb 14 17:21:48 2005] [error] [client 10.50.8.55] Options ExecCGI is
off in this directory:
/home/hobbit/hobbit/server/www/help/manpages/man1/bb-hostsvc.cgi.1.html,
referer: http://10.50.8.10/hobbit/help/manpages/

in my access_log. I'm running Apache 2.0.52 with the following lines added
after installing Hobbit (4.0-rc1 updated to 4.0-rc2) :


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


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


ScriptAlias /hobbit-seccgi/ "/home/hobbit/hobbit/cgi-secure/"
<Directory "/home/hobbit/hobbit/cgi-secure">
    AllowOverride None
    Options ExecCGI Includes
    Order allow,deny
    Allow from all
    AuthUserFile /home/hobbit/hobbit/server/etc/hobbitpasswd
    AuthType Basic
    AuthName "Hobbit Administration"
    Require valid-user
</Directory>


What can I change besides adding "Options ExecCGI" for my /hobbit/ alias ?

Thanks in advance.

Regards,

-- 

Frédéric Mangeant
list Henrik Størner · Mon, 14 Feb 2005 17:49:55 +0100 ·
quoted from Frédéric Mangeant
On Mon, Feb 14, 2005 at 05:38:44PM +0100, Frédéric Mangeant wrote:
Hi all

I'm not allowed to access any hobbit manpage whose name include "cgi" (for
example bb-hostsvc.cgi.1.html); it results in

[Mon Feb 14 17:21:48 2005] [error] [client 10.50.8.55] Options ExecCGI is
off in this directory:
/home/hobbit/hobbit/server/www/help/manpages/man1/bb-hostsvc.cgi.1.html,
referer: http://10.50.8.10/hobbit/help/manpages/
It's Apache that sees the ".cgi" in the filename and mistakes it for a
CGI script.
What can I change besides adding "Options ExecCGI" for my /hobbit/ alias ?
Dont do that - it will try to run the man-page as a program, instead
of showing it.

I had this problem on one server, and fixed it a while back. I'm not
quite sure what I did, but it was probably just finding the line

   AddHandler cgi-script .cgi

in the Apache config, and removing it. However, this does it on a
system-wide basis, so if you have CGI scripts enabled and allow your
users to use CGI by creating files named "someting.cgi", then you
probably don't want to do that.


Henrik
list Frédéric Mangeant · Mon, 14 Feb 2005 18:00:22 +0100 ·
quoted from Henrik Størner
I'm not allowed to access any hobbit manpage whose name > include "cgi" > (for example bb-hostsvc.cgi.1.html); it results in
It's Apache that sees the ".cgi" in the filename and mistakes it for a CGI script.
What can I change besides adding "Options ExecCGI" for my > /hobbit/ alias ?
Dont do that - it will try to run the man-page as a program, instead of showing it.

I had this problem on one server, and fixed it a while back. I'm not quite sure what I did, but it was probably just finding the line

   AddHandler cgi-script .cgi

in the Apache config, and removing it. However, this does it on a system-wide basis, so if you have CGI scripts enabled and allow your users to use CGI by creating files named "someting.cgi", then you probably don't want to do that.
As we have some .cgi scripts running, I prefer using man2html.

I've modified $BBHOME/www/help/manpages/index.html like this :

<a href="/cgi-bin/man/man2html?bb-hostsvc.cgi">

instead of

<a href="man1/bb-hostsvc.cgi.1.html">

Maybe you could modify the configure script to ask if man2html is installed,
and generate $BBHOME/www/help/manpages/index.html considering the answer ?

Regards,

-- 

Frédéric Mangeant
list Henrik Størner · Tue, 15 Feb 2005 22:24:40 +0100 ·
quoted from Frédéric Mangeant
On Mon, Feb 14, 2005 at 05:38:44PM +0100, Frédéric Mangeant wrote:
I'm not allowed to access any hobbit manpage whose name include
"cgi" (for example bb-hostsvc.cgi.1.html)
Anonymous mailed me - he had the same problem and found the
solution:

   This occurs because by default, apache associates the cgi-script
   handler with any filename containing ".cgi".  I fixed this on my
   server by changing the following line in my httpd.conf

   AddHandler cgi-script .cgi   ->to->  AddHandler cgi-script .cgi$

   This forces the match to only occur if the ".cgi" is at the end of
   the filename (duh) :)


Regards,
Henrik
list Frédéric Mangeant · Wed, 16 Feb 2005 10:35:12 +0100 ·
quoted from Henrik Størner
Anonymous mailed me - he had the same problem and found the
solution:

   This occurs because by default, apache associates the cgi-script
   handler with any filename containing ".cgi".  I fixed this on my
   server by changing the following line in my httpd.conf

   AddHandler cgi-script .cgi   ->to->  AddHandler cgi-script .cgi$

   This forces the match to only occur if the ".cgi" is at the end of
   the filename (duh) :)
That did the trick. Thanks !

-- 

Frédéric Mangeant