Problem with SSI (server side includes)
I have purchased OptiPerl and have a question about testing with the recommended Apache server installed locally for testing purposes. I have downloaded and installed the recommended Apache server and support files and can run a CGI file directly in the browser (for example URL http://localhost/cgi-bin/tryit.cgi.)
However when I try to run the CGI from an html file, using for example <!--#exec cgi="/tryit.cgi"-->, it does not work. I have done what I think is necessary to configure the server (settings in httpd.conf, enble SSI, etc...) and tried various pathnames to
the file but have not had any success. I am not sure what path is expected in the <!--#exec cgi="/tryit.cgi"--> or what other configuration settings might be necessary.
Do you have any suggesstions?
Answer:
The problem might be something else, but the line:
<!--#exec cgi="/tryit.cgi"-->
would not work. This is like calling
http://127.0.0.1/tryit.cgi
which I assume does not exist. Probably you want the file
http://127.0.0.1/cgi-bin/tryit.cgi
so this is needed
<!--#exec cgi="/cgi-bin/tryit.cgi"-->
Generally you put in the quotes the same path you would
use to call the cgi directly.
21.11.2002. 17:50
This article hasn't been commented yet.
Write a comment