|
Home > Archive > Apache Server configuration support > November 2006 > Need assistance configuring Apache for cgi scripting
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Need assistance configuring Apache for cgi scripting
|
|
| numberwhun 2006-11-04, 1:16 pm |
| Hello everyone! I am hoping that you can assist me in getting cgi scripting
working on my system. I am running Apache 2 on Suse Linux 10.1, that is
installed on my laptop.
I have gone through some documentation that I can find, specifically the
Apache documentation online
(http://httpd.apache.org/docs/2.0/howto/cgi.html) for configuring the web
server, but have had no joy yet in getting it working.
I have added to my httpd.conf file, the following line:
ScriptAlias /cgi /srv/www/cgi-bin
I have also added the following in hopes of getting this to work, but to no
avail:
AddHandler cgi-script .cgi .pl
<Directory /srv/www/htdocs/cgi>
Options ExecCGI
</Directory>
I have stopped and re-started the apache2 module, but still, when I load the
page http:/localhost/cgi/script.cgi I get a box that asks me if I want to
open the file or save it. I am at a brick wall at the moment. I tried
posting this question to the #apache group on IRC, but there was nobody on
line that knew anything about Linux or Suse for that matter.
Please, if anyone has any ideas on how to get this working, I am totally
open to suggestions.
Thank you in advance for any and all help you can provide.
Regards,
jlk
| |
|
| "numberwhun" <me@home.com> schreef in bericht
news:Up33h.2139$3r6.1362@trndny09...
> (http://httpd.apache.org/docs/2.0/howto/cgi.html) for configuring
> the web server, but have had no joy yet in getting it working.
>
> I have added to my httpd.conf file, the following line:
> ScriptAlias /cgi /srv/www/cgi-bin
>
> I have also added the following in hopes of getting this to work,
> but to no avail:
> AddHandler cgi-script .cgi .pl
> <Directory /srv/www/htdocs/cgi>
> Options ExecCGI
> </Directory>
>
> I have stopped and re-started the apache2 module,
Module? Presume it was the deamon.
> but still, when I load the page
> http:/localhost/cgi/script.cgi
> I get a box that asks me if I want to
> open the file or save it. I am at a brick wall at the moment.
Seems like your folder /srv/www/htdocs/cgi
is conflicting with the scriptalias.
It's either not both.
If your config holds <VirtualHost ...>...</VirtualHost> section(s),
then move the scriptalias into each section.
HansH
| |
| Joshua Slive 2006-11-05, 7:22 pm |
|
On Nov 4, 11:42 am, numberwhun <m...@home.com> wrote:
> I have stopped and re-started the apache2 module, but still, when I load the
> page http:/localhost/cgi/script.cgi I get a box that asks me if I want to
> open the file or save it.
If you do download it and look inside, do you get the source code of
the CGI script, or do you get the source code of the html output by the
cgi script? In the latter case, your CGI script is not sending the
correct Content-Type header. In the former case, your script is not
designated as a CGI script in the apache configuration. Tell us
exactly what URL you used to access it, and exactly what appeared in
the access log.
Joshua.
|
|
|
|
|