Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
That's a really bad idea. Shell scripts are ridiculously hard to make secure due to arcane quoting rules etc, you're better off using Perl for that, in which case there are lots of tutorials, FAQs etc on the net and the apache website.
Im inside of one of the most secure networks Ive ever seen, I honestly dont care how unsecure it is. So, how do you run a shell script with Apache by clicking a button. I just want directions, not criticism.
You do it for bash the same way you'd do it for Perl - CGI is language neutral.
There are docs on httpd.apache.org for that. Basically:
create a standard script with the #! (shebang) line at the top.
make it +x
Add a cgi handler directive to the config file for the directory the file is in
Enable the CGI option in the config file (docs tell you how to do this)
In your web page put a form with the method attribute set to the path of the script on the webserver
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.