I have been trying for two days to run my program via cgi, but, as expected, I am banging my head against the wall.
I am running ubuntu latest updated version and I am brand new in the linux community. I am sure I am doing it all wrong, but anyways let me say what I've been trying:
1. I have set a console executable, called vp, to be located in folder /var/www/cgi-bin/
2. I have set /var/www/index.html to contain a template from raffo's links:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
<HTML>
<HEAD><TITLE>Test CGIcc form</TITLE></HEAD>
<BODY bgcolor="#cccccc" text="#000000">
<H2>Test CGIcc form</H2>
<P>
<FORM method="POST" action="./cgi-bin/vp">
Value 1 :
<input type="text" name="value1">
<P>
Value 2 :
<select name="value2">
<option value="option1">Option 1
<option value="option2">Option 2
<option value="option3">Option 3
</select>
<P>
Value 3 :
<input type="radio" name="value3" value="button1" checked="checked">Button1
<input type="radio" name="value3" value="button2">Button2
<input type="hidden" name="value4" value="data4">
<P>
<input type="submit" value="Submit">
</FORM>
</BODY>
</HTML>
| |
3. I open http//localhost with my favorite browser.
4. I click the sample button given by the above code.
5. My browser offers me to download the executable file.
Instead I want it to execute the file (on the server, with default user privileges).
How should I do this? What I am doing wrong - is there another command for making a program run on the server? I saw many configuration-y looking files in the folder /etc/apache2 . Is there some configuration that needs to be done there? (atm it has default settings).
Thanks!