Sharath Arakere February 2016
Execute a bash script in remote server through URL
I have a bash script "Hello.sh" below in my remote server "A" which is running Apache.
echo "Hello World" > Hello.txt
I want to execute this script in remote server "A" itself by calling it's Apache URL from server "B" like below.
Please note I have made the script available through URL by keeping it in Document root of Apache.
How can this be accomplished. Thanks.
JazzCat February 2016
To be able to run shell scripts directly from the browser, you should add this rule to your .htaccess file.
AddHandler cgi-script .sh
This tells the webserver to treat .sh files as CGI scripts.
Asked in February 2016
Viewed 3,565 times
Answered 1 times
Leave an answer
Quote of the day: live life