logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Shell downloads instead of creating a web page
Author
Lanny



Joined: 05 Jun 2013
Posts: 2
Location: Czech, Prague

PostPosted: Wed 05 Jun '13 17:18    Post subject: Shell downloads instead of creating a web page Reply with quote

Server version: Apache/2.2.22 (Unix)
Server built: Dec 9 2012 18:57:18
OS/X 10.8.4

I am trying to run a shell program to generate a web page. When I enter it as test.cgi, it does exactly what I expect. When I enter it as test.sh, it downloads the results to my client instead of writing the page. (Of course test.cgi and test.sh are exact copies and in the same directory.]

I have setup
+ Options ExecCGI
AddHandler cgi-script .cgi .sh
AddType .sh application/x-sh

What am I missing?
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7404
Location: EU, Germany, Next to Hamburg

PostPosted: Wed 05 Jun '13 18:01    Post subject: Reply with quote

Indeed, the output should be text/html

So
AddType .sh text/html

or don't use AddType in httpd.conf, but send the header
in your application
Back to top
Lanny



Joined: 05 Jun 2013
Posts: 2
Location: Czech, Prague

PostPosted: Wed 05 Jun '13 22:07    Post subject: Reply with quote

Thank you for this lightning response - you were right.
Back to top


Reply to topic   Topic: Shell downloads instead of creating a web page View previous topic :: View next topic
Post new topic   Forum Index -> Apache