Xymon Mailing List Archive search

apache trying to execute cgi man pages

6 messages in this thread

list Bruce Ferrell · Wed, 18 May 2016 00:35:59 -0700 ·
I'm getting some errors that are making me nuts when I access the man pages for the cgi programs

The apache log shows this:

Options ExecCGI is off in this directory: /home/xymon/server/www/help/manpages/man1/ackinfo.cgi.1.html, referer: http://server.org/xymon/help/manpages/man1/

And of course, when I add ExecCGI I get:

Premature end of script headers: ackinfo.cgi.1.html

The server is scientific linux 6

Suggestions?
list Xymon User in Richmond · Wed, 18 May 2016 10:33:49 -0400 ·
 
I'd look through the Apache configs for a regex that matches the folder
(or objects with ".cgi"), probably in a ScriptAliasMatch or
LocationMatch directive (although there are a number of other
candidates). 
quoted from Bruce Ferrell
On 2016-05-18 3:35, Bruce Ferrell wrote: 
I'm getting some errors that are making me nuts when I access the man pages for the cgi programs

The apache log shows this:

Options ExecCGI is off in this directory: /home/xymon/server/www/help/manpages/man1/ackinfo.cgi.1.html, referer: http://server.org/xymon/help/manpages/man1/ [1]
quoted from Bruce Ferrell

And of course, when I add ExecCGI I get:

Premature end of script headers: ackinfo.cgi.1.html

The server is scientific linux 6

Suggestions?

list Bruce Ferrell · Wed, 18 May 2016 23:51:08 -0700 ·
I didn't find the problem directive, BUT I did find that apache 2 interprets files like these as multi extension files (i.e. both cgi AND html are extensions, cgi being found first)

SO I added the following to the bottom of xymon-apache.conf:

<FilesMatch \.html>
  SetHandler text/html
</FilesMatch>

forcing the html man pages to html
quoted from Xymon User in Richmond


On 05/18/2016 07:33 AM, user-24d6f8323faa@xymon.invalid wrote:
I'd look through the Apache configs for a regex that matches the folder (or objects with ".cgi"), probably in a ScriptAliasMatch or LocationMatch directive (although there are a
number of other candidates).

 
On 2016-05-18 3:35, Bruce Ferrell wrote:
I'm getting some errors that are making me nuts when I access the man pages for the cgi programs

The apache log shows this:

Options ExecCGI is off in this directory: /home/xymon/server/www/help/manpages/man1/ackinfo.cgi.1.html, referer: http://server.org/xymon/help/manpages/man1/

And of course, when I add ExecCGI I get:

Premature end of script headers: ackinfo.cgi.1.html

The server is scientific linux 6

Suggestions?

list Xymon User in Richmond · Thu, 19 May 2016 09:53:11 -0400 ·
 
Glad you figured it out. 
Given that the file name has "cgi.1.html", I'd consider the handling as
a multi-extension to be a bug. 
quoted from Bruce Ferrell
On 2016-05-19 2:51, Bruce Ferrell wrote: 
I didn't find the problem directive, BUT I did find that apache 2 interprets files like these as multi extension files (i.e. both cgi AND html are extensions, cgi being found first)

SO I added the following to the bottom of xymon-apache.conf:

<FilesMatch .html>
SetHandler text/html
</FilesMatch>

forcing the html man pages to html

On 05/18/2016 07:33 AM, user-d37f300c2202@xymon.invalid:
I'd look through the Apache configs for a regex that matches the folder (or objects with ".cgi"), probably in a ScriptAliasMatch or LocationMatch directive (although there are a number of other candidates). On 2016-05-18 3:35, Bruce Ferrell wrote: I'm getting some errors that are making me nuts when I access the man pages for the cgi programs The apache log shows this: Options ExecCGI is off in this directory: /home/xymon/server/www/help/manpages/man1/ackinfo.cgi.1.html, referer: http://server.org/xymon/help/manpages/man1/ [1] And of course, when I add ExecCGI I get: Premature end of script headers: ackinfo.cgi.1.html The server is scientific linux 6 Suggestions? [2]
list Bruce Ferrell · Thu, 19 May 2016 07:13:58 -0700 ·
Yeah, maybe, except it's how apache does multi-language page support i.e:

help.fr.html
help.en.html
help.cn.html

etc
quoted from Xymon User in Richmond


On 5/19/16 6:53 AM, user-24d6f8323faa@xymon.invalid wrote:
Glad you figured it out.

Given that the file name has "cgi.1.html", I'd consider the handling as a multi-extension to be a bug.

On 2016-05-19 2:51, Bruce Ferrell wrote:
I didn't find the problem directive, BUT I did find that apache 2 interprets files like these as multi extension files (i.e. both cgi AND html are extensions, cgi being found first)

SO I added the following to the bottom of xymon-apache.conf:

<FilesMatch \.html>
   SetHandler text/html
</FilesMatch>

forcing the html man pages to html


On 05/18/2016 07:33 AM,user-24d6f8323faa@xymon.invalid <mailto:user-24d6f8323faa@xymon.invalid>wrote:
I'd look through the Apache configs for a regex that matches the folder (or objects with ".cgi"), probably in a ScriptAliasMatch or LocationMatch directive (although there are a number of other candidates). On 2016-05-18 3:35, Bruce Ferrell wrote:
I'm getting some errors that are making me nuts when I access the man pages for the cgi programs The apache log shows this: Options ExecCGI is off in this directory: /home/xymon/server/www/help/manpages/man1/ackinfo.cgi.1.html, referer: http://server.org/xymon/help/manpages/man1/ And of course, when I add ExecCGI I get: Premature end of script headers: ackinfo.cgi.1.html The server is scientific linux 6 Suggestions? 
list Xymon User in Richmond · Thu, 19 May 2016 15:00:43 -0400 ·
 
Yep, NOTABUG. Documented in mod_mime doc as a quirk, with workaround. 
quoted from Bruce Ferrell
On 2016-05-19 10:13, Bruce Ferrell wrote: 
Yeah, maybe, except it's how apache does multi-language page support i.e:

help.fr.html
help.en.html
help.cn.html

etc

On 5/19/16 6:53 AM, user-24d6f8323faa@xymon.invalid wrote: 
Glad you figured it out. 
Given that the file name has "cgi.1.html", I'd consider the handling as a multi-extension to be a bug. 
On 2016-05-19 2:51, Bruce Ferrell wrote: 
I didn't find the problem directive, BUT I did find that apache 2 interprets files like these as multi extension files (i.e. both cgi AND html are extensions, cgi being found first)

SO I added the following to the bottom of xymon-apache.conf:

<FilesMatch .html>
SetHandler text/html
</FilesMatch>

forcing the html man pages to html

On 05/18/2016 07:33 AM, user-d37f300c2202@xymon.invalid:
I'd look through the Apache configs for a regex that matches the folder (or objects with ".cgi"), probably in a ScriptAliasMatch or LocationMatch directive (although there are a number of other candidates). On 2016-05-18 3:35, Bruce Ferrell wrote: I'm getting some errors that are making me nuts when I access the man pages for the cgi programs The apache log shows this: Options ExecCGI is off in this directory: /home/xymon/server/www/help/manpages/man1/ackinfo.cgi.1.html, referer: http://server.org/xymon/help/manpages/man1/ [1] And of course, when I add ExecCGI I get: Premature end of script headers: ackinfo.cgi.1.html The server is scientific linux 6 Suggestions? [2]