Hello All,
first of all please forgive me if I have brocken some rule of this forum and this is not a homework :).
Could you please help me as I have created a new apache service in a server by creating a new httpd.conf for the new service. Now in the httpd.conf file I have studied by google and tried to put the values correct for configuration like I have put Document root
, Alias
, Listen
and Script Alias
etc and I am able to hit the link successfully, but when I have put a simple cgi script(which is nothing but a simple html code) in the same link and in spite of reading echo, !#/usr/ksh
commands it is simply putting echo
in IE.
What I think is it is taking file as a text file, could you please let me know how I can fix this.
Here is the CGI.
#!/usr/bin/ksh
echo "Content-Type: text/html"
echo "<HTML>"
echo "<HEAD>"
echo "<TITLE>Singh test</TITLE>"
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">"
echo "<SCRIPT TYPE=\"text/javascript\">"
echo "<!--"
echo "window.focus();"
echo "//-->"
echo "</SCRIPT>"
echo "</HEAD>"
echo "<BODY>"
echo "</HEAD>"
echo "<BODY TEXT vlink="black" link="blue" alink="white" >"
echo "<CENTER><STRONG> status form</STRONG></CENTER>"
echo "<FORM METHOD=POST ACTION=/opt/hd/test/test.cgi>"
echo "</FORM>"
echo "</BODY>"
echo "</HTML>"
Thanks,
R. Singh