cgi scripts (was Re: Getting there)
Do I need to create a service (similar to SWAT) to allow a user to run the html script and access the cgi file? What address do I need to include in the html script so that the cgi script can be linked to?
How much do you know about CGI scripts ? Assuming that you haven't come across these before (forgive me if this assumption is incorrect), but you will need a web server to 'serve them up' (apache is the usual choice for Linux). Basically, the HTML file will do in the documents area of the web server and the CGI script will go in the 'scripts area'. These are 'htdocs' (sometimes 'html') and cgi-bin respectively for apache (often installed in /home/httpd). The client connects to the HTML and CGI scripts via a web browser using something like : http://your.machine/passwd.html Which in turn will probably invoke the script, which could also be called directly at : http://your.machine/cgi-bin/passwd.cgi There may well be a '<form ... >' statement in the passwd.html with an 'action=xyz' bit. This may have to be changed to point to the passwd.cgi script, as seen by users via your web server (for example above, this would be something like 'action=/cgi-bin/passwd.cgi'). Does this help at all ? Drop me a line if you need more details. Kevin Northants Linux Users Group kevin@northants.lug.org.uk
On 20 Jun, <kevin.taylor@powerconv.alstom.com> wrote:
Do I need to create a service (similar to SWAT) to allow a user to run the html script and access the cgi file? What address do I need to include in the html script so that the cgi script can be linked to?
How much do you know about CGI scripts ? Assuming that you haven't come across these before (forgive me if this assumption is incorrect), but you will need a web server to 'serve them up' (apache is the usual choice for Linux).
Quite right - I know nothing about cgi.
Basically, the HTML file will do in the documents area of the web server and the CGI script will go in the 'scripts area'. These are 'htdocs' (sometimes 'html') and cgi-bin respectively for apache (often installed in /home/httpd).
The client connects to the HTML and CGI scripts via a web browser using something like : http://your.machine/passwd.html
Which in turn will probably invoke the script, which could also be called directly at : http://your.machine/cgi-bin/passwd.cgi
There may well be a '<form ... >' statement in the passwd.html with an 'action=xyz' bit. This may have to be changed to point to the passwd.cgi script, as seen by users via your web server (for example above, this would be something like 'action=/cgi-bin/passwd.cgi').
Does this help at all ? Drop me a line if you need more details.
Yes, thanks very much. I will have a look at Apache when time permits. ATM we have a router which connects to a proxy run by the city council. I had hoped to use squid as a cache to speed up access by clients. Would Apache fit in with this situation or is it intended as (in our case) an Intranet server? Dave
Kevin Northants Linux Users Group kevin@northants.lug.org.uk
participants (2)
-
Dave Williams
-
kevin.taylor@powerconv.alstom.com