Hi
I’m trying to setup a simple CGI script on my newly installed Apache2 server.
t1.cgi:
----------------------------
#!/bin/sh
echo Content-type: text/html
echo
echo Hello World
index.html:
----------------------------
<HTML>
<BODY>
start
<FORM ACTION="/cgi-bin/t1.cgi" METHOD="POST">
stop
</BODY>
</HTML>
My cgi-script (t1.cgi) is placed in /var/www/cgi-bin/
I added “ScriptAlias /cgi/bin/ /var/www/cgi-bin/” to the Apache conf file.
Whenever I type
http://127.0.0.1/cgi-bin/t1.cgi in my browser, I get the expected output:
Hello World
Whenever I type
http://127.0.0.1/index.html in my browser, I only get :
start
stop
It seems that the cgi-script never gets invoked.
I’m using Mandrake 10.1 and Apache2-2.0.50.
Any help will be appreciated.
Thanks
Jones