Execute .sh files in webbrowser with apache2 as server
Hi, i just installed "apache2" on my Ubuntu 14.04 virtual machine.
I try to execute this simple .sh file from the browser. Code:
#!/bin/bash Code:
localhost/projekt/cgi-bin/date.sh http://www.pasteall.org/pic/show.php?id=93097 It is a save/open file dialog. I already searched for a solution on google and found this: Code:
sudo a2enmod cgi And the problem still remains, even after restarting the browser. Does anyone know how to solve this? |
Since this is not the default cgi-bin directory for apache in ubuntu, you need to add the following:
Code:
<Directory /var/www/html/projekt/cgi-bin> |
Solved
Quote:
|
Ok with .sh it works fine. But i just tried it with this simple perl script.
Code:
#! /usr/bin/perl Should i create an extra thread for this problem? |
Quote:
Code:
<Directory /var/www/html/projekt/cgi-bin> |
I already tried this before exactly like you wrote, it still tries to download tho.
|
Quote:
Clear the cache, or use another browser and try again |
Ah ok, but now i get internal server error. Do you know what a possible cause could be? I already did "chmod 755 test.pl". I tried to execute the script from the console, following output appeared: <p>Hello World</p>, so the script should work, right?
But why i get the internal server error then? Edit Solved, i had to add this line to my script: So this is the working script: Code:
#! /usr/bin/perl |
Quote:
You can mark the thread "SOLVED" using the "Thread Tools_ on top of the page Regards |
All times are GMT -5. The time now is 02:35 PM. |