You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Peter <pg...@optusnet.com.au> on 2002/04/16 15:37:39 UTC

Setting up Apache for CGI programs on windows 98

I am trying to configure apache to run on Windows98 so that I can develop a Web site with forms using CGI programs.
I have followed the instruction in the web site http//www.visca.com/clueless/perl_apache_win9x.htlm which provides a tutorial on installing Active Perl and Apache 1.3

I can start the Apache server and can run perl programs

However from Internet Explore entering localhost fails  It cannot find the index page in the designated directory.

I can get the page up by specifically entering the directory path.  When the form is submitted it tries to down load the CGI program rather than run it.

Where should I look so solve these problems which presumably are configuration problems..

Regards

Peter Goggin


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.338 / Virus Database: 189 - Release Date: 15/03/02

Re: Setting up Apache for CGI programs on windows 98

Posted by Owen Boyle <ob...@bourse.ch>.
Peter wrote:
> 
> I reset the Apache config file to have localhost as the ServerName. This
> allows me to get the proper page by entering http://localhost/.
> 
> I still have the problem that the browser asks if I want to download the CGI
> program.

That's good - at least the server is working and can find the file! It
just doesn't know that it is a program...

The basic idea is that you make a mapping between the directory
containing your programs and the URL you want to use to refer to them.
This mapping is called the ScriptAlias.

For instance, if your programs are in C:\User\Apache\CGI and you want to
refer to them by the URL http://localhost/cgi, then you do:

ScriptAlias /cgi C:\User\Apache\CGI

You don't need quotes (unless you have spaces in filenames...) or
trailing slashes. Note that you can call your CGI directory and the URL
to it anything you like - cgi and cgi-bin are just traditional.

Once you get the program executing (you'll know this when you get an
Internal Server Error :-), there are a couple of other things - mainly
you need to send a CGI header before any data. See the apache docs about
CGI for details.

Rgds,

Owen Boyle.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: Setting up Apache for CGI programs on windows 98

Posted by Peter <pg...@optusnet.com.au>.
I reset the Apache config file to have localhost as the ServerName. This
allows me to get the proper page by entering http://localhost/.

I still have the problem that the browser asks if I want to download the CGI
program.

Regards

Peter Goggin
----- Original Message -----
From: "Owen Boyle" <ob...@bourse.ch>
To: <us...@httpd.apache.org>
Sent: Tuesday, April 16, 2002 11:55 PM
Subject: Re: Setting up Apache for CGI programs on windows 98


> > Peter wrote:
> >
> > I am trying to configure apache to run on Windows98 so that I can
> > develop a Web site with forms using CGI programs.
> > I have followed the instruction in the web site
> > http//www.visca.com/clueless/perl_apache_win9x.htlm which provides a
> > tutorial on installing Active Perl and Apache 1.3
> >
> > I can start the Apache server and can run perl programs
> >
> > However from Internet Explore entering localhost fails  It cannot find
> > the index page in the designated directory.
>
> The HOWTO page you are referring to tells you to do a trick whereby you
> set up your server to respond to www.mydomain.com and then you hack your
> hosts file so that this maps to 127.0.0.1. Did you do this?
>
> Personally, I wouldn't mess around with your localhost definition. It's
> better to point your apache server at localhost directly. In other
> words,
>
> ServerName localhost
>
> then restart apache
>
> >
> > I can get the page up by specifically entering the directory path.
> > When the form is submitted it tries to down load the CGI program
> > rather than run it.
>
> This is just file lookup in the browser - not using the server at all.
>
> Rgds,
>
> owen Boyle.
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.338 / Virus Database: 189 - Release Date: 15/03/02


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: Setting up Apache for CGI programs on windows 98

Posted by Owen Boyle <ob...@bourse.ch>.
> Peter wrote:
> 
> I am trying to configure apache to run on Windows98 so that I can
> develop a Web site with forms using CGI programs.
> I have followed the instruction in the web site
> http//www.visca.com/clueless/perl_apache_win9x.htlm which provides a
> tutorial on installing Active Perl and Apache 1.3
> 
> I can start the Apache server and can run perl programs
> 
> However from Internet Explore entering localhost fails  It cannot find
> the index page in the designated directory.

The HOWTO page you are referring to tells you to do a trick whereby you
set up your server to respond to www.mydomain.com and then you hack your
hosts file so that this maps to 127.0.0.1. Did you do this?

Personally, I wouldn't mess around with your localhost definition. It's
better to point your apache server at localhost directly. In other
words,

ServerName localhost

then restart apache

> 
> I can get the page up by specifically entering the directory path.
> When the form is submitted it tries to down load the CGI program
> rather than run it.

This is just file lookup in the browser - not using the server at all.

Rgds,

owen Boyle.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: Setting up Apache for CGI programs on windows 98

Posted by Jay Turberville <ja...@studio522.com>.
I'm also new to Apache, so this information could be wrong.  However, its
easy to change back if it doesn't work.

In httpd.conf set the following:

Listen 80

and

ServerName 10.0.0.5:80

where the IP address is your server's IP address and 80 is the port you want
Apache to monitor.  Then entering "localhost" or the IP address as the URL
should work.

Good Luck.

Jay



----- Original Message -----
From: Peter
To: users@httpd.apache.org
Sent: Tuesday, April 16, 2002 6:37 AM
Subject: Setting up Apache for CGI programs on windows 98


I am trying to configure apache to run on Windows98 so that I can develop a
Web site with forms using CGI programs.
I have followed the instruction in the web site
http//www.visca.com/clueless/perl_apache_win9x.htlm which provides a
tutorial on installing Active Perl and Apache 1.3

I can start the Apache server and can run perl programs

However from Internet Explore entering localhost fails  It cannot find the
index page in the designated directory.

I can get the page up by specifically entering the directory path.  When the
form is submitted it tries to down load the CGI program rather than run it.

Where should I look so solve these problems which presumably are
configuration problems..

Regards

Peter Goggin




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org