LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   configuring a cgi shell script to run (https://www.linuxquestions.org/questions/linux-newbie-8/configuring-a-cgi-shell-script-to-run-331937/)

keeg 06-09-2005 01:36 PM

configuring a cgi shell script to run
 
I'm trying to get to work a simple shell script in the cgi-bin directory used by my apache web server. The script just echos test to stdout (and I've run it on the command line to verify that it works), now I just need to know how to chmod or whatever so that it can be run from the outside world with an http request to the server.

Thanks for any help you can give,

- keeg (that's geek spelled backwards)

micxz 06-09-2005 01:45 PM

It should be chmod'ed to 755 or 'rwxr-xr-x'. You also may need to print a header like:

Code:

#!/usr/bin/perl
print "Content-type: text/html", "\n\n";
print "test"

That's two new lines after the contype. How to chmod try "man chmod" it's an easy learn. Hope this helps.


All times are GMT -5. The time now is 08:43 AM.