Sunday, December 31, 2017

Re: Cgi shell script in httpd

Hi Jordon,

Jordon wrote on Sun, Dec 31, 2017 at 09:29:05PM -0600:

> I thought it would be nice to create a shell script with the old name
> that would spit out a simple page saying the name changed and providing
> a link to the new cgi app. I made the shell script but for the life of
> me cannot get it to work. Is this allowed/supported in httpd?
> If so, any idea what I could be missing?

You are providing no information whatsoever, so let me try a shot in
the utter dark and hope i don't hit any of the cats on your couch:

Maybe you are running httpd(8) chroot(2)ed but don't have any sh(1)
binary in the chroot? That's a common error.

By the way, putting a shell binary in a chroot (or any other
interpreter for that matter, like PHP) is an ugly thing to do, so
a good alternative might be to write the redirect CGI program in C
as well (which you already managed to do for something more
complicated), or even simpler, make it a static HTML page and tell
httpd.conf(5) with location { no fastcgi } and types { } to simply
serve it as text/html, even if the name ends in *.cgi or something
like that.

Yours,
Ingo

No comments:

Post a Comment