You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Ken Godee <ke...@perfect-image.com> on 2002/07/30 21:40:04 UTC

.pl .cgi / cgi-scripts, handlers

I know this has been talked about alot, but I've combed
thru the email list/faq and have tried many things, but still can't
get it working right. I don't want to make this drawn out, but if
someone has an easy solution it would be great.

Apache 1.3.26 (compiled with modules)
Rh 7.1

I have the "same" 2 scripts with dif. ext's "first.pl" and "first.cgi"
On "client" browers first.cgi executes as normal, but first.pl wants 
to download instead of executing :(
On the server that Apache is running on, both versions execute 
correctly! (thru browser)  (logged in as root or normal user)

Browsers on both machines are going thru squid proxy.

Permissions (as far as I know) are configured correctly.

[root@cpq866 cgi-bin]# pwd
   /var/www/cgi-bin
[root@cpq866 cgi-bin]# l
   -rwxr-xr-x    1 root     root          272 Jul 30 08:35 first.cgi
   -rwxr-xr-x    1 root     root          272 Jul 26 17:23 first.pl
Tried chowning apache.apache * (no help)

httpd.conf has;

ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"

<Directory "/var/www/cgi-bin">
    AllowOverride None
    AddHandler cgi-script cgi pl
    Options ExecCGI
    Order allow,deny
    Allow from all
</Directory>

 "AddHandler cgi-script cgi pl" inside or outside of 
directive makes no dif. Either does "." as in ".cgi" ".pl"

No errors in error.log

Mod_cgi is compiled into Apache as verified by httpd -l

cgi-bin has no .htaccess file

Only one httpd.conf on system.

I can always just name perl scripts with the ".cgi" instead
of ".pl" to get them to work, but I hate doing things like
that.
Any help would be great.
TIA

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: .pl .cgi / cgi-scripts, handlers

Posted by Ken Godee <ke...@perfect-image.com>.
Joshua,
That was it! 
I was setting the Content-Type wrong in the scripts and the
"wonderful" MSIE is using its silly extensions mapping to figure out what
to do. Which is also why the browser on the server worked (netscape).
I was setting "Content-Type : text/plain"
changed to "Content-Type : text/html" and
added some html tags and away it went.

As in my original post ......
"AddHandler cgi-script cgi pl" 
outside of directory directive makes no dif.
It's all working now with no AddHandler cgi-script cgi pl
accept in the ScriptAlias.
Adding it earlier made no dif, I tried.
As far I read adding it to the directory directive
allows scripts to be executed in that directory only!
Outside of directory directive makes it gobal server statement and
will then allow scripts to be executed almost anywhere
not a real good thing, me thinks I would "not" use it
outside of any directory directive.

I knew it was something simple,
I now know more about, then I cared to learn.
Never had this problem before, so glad I found it and learned
something new.

Anyway, Thanks for the help. 

> 
> On Tue, 30 Jul 2002, Ken Godee wrote:
> > I have the "same" 2 scripts with dif. ext's "first.pl" and "first.cgi"
> > On "client" browers first.cgi executes as normal, but first.pl wants
> > to download instead of executing :(
> > On the server that Apache is running on, both versions execute
> > correctly! (thru browser)  (logged in as root or normal user)
> 
> Uhhh... That implies to mean only one thing: the scripts are working fine,
> but you are setting the Content-Type wrong in the scripts and the
> "wonderful" MSIE is using its silly extensions mapping to figure out what
> to do.
> 
> Try checking the content-type line output by the script, and give us a
> test url so we can look at the output of the two scripts.
> 
> Joshua.
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: .pl .cgi / cgi-scripts, handlers

Posted by Lewis Watson <li...@visionsix.com>.
----- Original Message -----
From: "Rodent of Unusual Size" <Ke...@Golux.Com>
To: <us...@httpd.apache.org>
Sent: Wednesday, July 31, 2002 12:50 PM
Subject: Re: .pl .cgi / cgi-scripts, handlers


> Lewis Watson wrote:
> >
> > Please read my message again. You seemed to have missed something.
>
> Yes, such as that Joshua was correct and that the AddHandler inside
> the ScriptAlias directory container had no effect, contrary to
> some recent assertions by others.
> --
> #ken P-)}
>
> Ken Coar, Sanagendamgagwedweinini  http://Golux.Com/coar/
> Author, developer, opinionist      http://Apache-Server.Com/
>
> "Millennium hand and shrimp!"


Hey Ken,
I agree with you / Joshua completely. That was the point. After I quoted
from the docs, 'admin' was under the impression that I agreed with him
(admin).
Thanks.
Lewis



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: .pl .cgi / cgi-scripts, handlers

Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
Lewis Watson wrote:
> 
> Please read my message again. You seemed to have missed something.

Yes, such as that Joshua was correct and that the AddHandler inside
the ScriptAlias directory container had no effect, contrary to
some recent assertions by others.
-- 
#ken	P-)}

Ken Coar, Sanagendamgagwedweinini  http://Golux.Com/coar/
Author, developer, opinionist      http://Apache-Server.Com/

"Millennium hand and shrimp!"

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: .pl .cgi / cgi-scripts, handlers

Posted by Lewis Watson <li...@visionsix.com>.
Please read my message again. You seemed to have missed something.
Thanks.
Lewis

----- Original Message -----
From: "Admin" <ko...@naisp.net>
To: <us...@httpd.apache.org>
Sent: Tuesday, July 30, 2002 4:14 PM
Subject: RE: .pl .cgi / cgi-scripts, handlers


> THANKYOU sir...I knew i was right...anyways...thanks for the backup
>
> -----Original Message-----
> From: Lewis Watson [mailto:lists@visionsix.com]
> Sent: Tuesday, July 30, 2002 4:58 PM
> To: users@httpd.apache.org; admin@myispnet.net
> Subject: Re: .pl .cgi / cgi-scripts, handlers
>
>
> I quote from the apache doc:
> <quote>
> "CGI programs are often restricted to ScriptAlias'ed directories for
> security reasons. In this way, administrators can tightly control who is
> allowed to use CGI programs. However, if the proper security precautions
are
> taken, there is no reason why CGI programs cannot be run from arbitrary
> directories. For example, you may wish to let users have web content in
> their home directories with the UserDir directive. If they want to have
> their own CGI programs, but don't have access to the main cgi-bin
directory,
> they will need to be able to run CGI programs elsewhere.
>
> Explicitly using Options to permit CGI execution
> You could explicitly use the Options directive, inside your main server
> configuration file, to specify that CGI execution was permitted in a
> particular directory:
>
>         <Directory /usr/local/apache/htdocs/somedir>
>                 Options +ExecCGI
>         </Directory>
> The above directive tells Apache to permit the execution of CGI files. You
> will also need to tell the server what files are CGI files. The following
> AddHandler directive tells the server to treat all files with the cgi or
pl
> extension as CGI programs:
>
>      AddHandler cgi-script cgi pl"
>
> </quote>
> This  quote is  after the <scriptalias> information. ScriptAlias needs no
> handler because its sole purpose in life is to provide a directory where
> scripts live. My httpd.conf does not have it and does not need it.
> Joshua has been helping people here for years. Do a search and see. The
> problem is elsewhere.
> Thanks.
> Lewis
>
>
> ----- Original Message -----
> From: "admin" <ko...@naisp.net>
> To: <us...@httpd.apache.org>
> Sent: Tuesday, July 30, 2002 2:52 PM
> Subject: RE: .pl .cgi / cgi-scripts, handlers
>
>
> > HELLOOOO. it must be in the main server config...as well, or it won't
work
> > mine works fine
> >
> >
> > -----Original Message-----
> > From: Joshua Slive [mailto:joshua@slive.ca]
> > Sent: Tuesday, July 30, 2002 3:49 PM
> > To: users@httpd.apache.org; admin@myispnet.net
> > Cc: ken@perfect-image.com
> > Subject: RE: .pl .cgi / cgi-scripts, handlers
> >
> >
> >
> > On Tue, 30 Jul 2002, admin wrote:
> >
> > > Look in your httpd.conf file that says:
> > >
> > > # If you want to use server side includes, or CGI outside
> > >     # ScriptAliased directories, uncomment the following lines.
> > >
> > > all you do is ADD the other extension as i did.
> > >
> > > this is why it's not workng
> >
> > Uhhh... Nope.  Notice that this line says "outside ScriptAliased
> > directories".  Sine he is using ScriptAlias, the AddHandler directive is
> > not necessary at all.
> >
> > Joshua.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: .pl .cgi / cgi-scripts, handlers

Posted by Admin <ko...@naisp.net>.
THANKYOU sir...I knew i was right...anyways...thanks for the backup

-----Original Message-----
From: Lewis Watson [mailto:lists@visionsix.com]
Sent: Tuesday, July 30, 2002 4:58 PM
To: users@httpd.apache.org; admin@myispnet.net
Subject: Re: .pl .cgi / cgi-scripts, handlers


I quote from the apache doc:
<quote>
"CGI programs are often restricted to ScriptAlias'ed directories for
security reasons. In this way, administrators can tightly control who is
allowed to use CGI programs. However, if the proper security precautions are
taken, there is no reason why CGI programs cannot be run from arbitrary
directories. For example, you may wish to let users have web content in
their home directories with the UserDir directive. If they want to have
their own CGI programs, but don't have access to the main cgi-bin directory,
they will need to be able to run CGI programs elsewhere.

Explicitly using Options to permit CGI execution
You could explicitly use the Options directive, inside your main server
configuration file, to specify that CGI execution was permitted in a
particular directory:

        <Directory /usr/local/apache/htdocs/somedir>
                Options +ExecCGI
        </Directory>
The above directive tells Apache to permit the execution of CGI files. You
will also need to tell the server what files are CGI files. The following
AddHandler directive tells the server to treat all files with the cgi or pl
extension as CGI programs:

     AddHandler cgi-script cgi pl"

</quote>
This  quote is  after the <scriptalias> information. ScriptAlias needs no
handler because its sole purpose in life is to provide a directory where
scripts live. My httpd.conf does not have it and does not need it.
Joshua has been helping people here for years. Do a search and see. The
problem is elsewhere.
Thanks.
Lewis


----- Original Message -----
From: "admin" <ko...@naisp.net>
To: <us...@httpd.apache.org>
Sent: Tuesday, July 30, 2002 2:52 PM
Subject: RE: .pl .cgi / cgi-scripts, handlers


> HELLOOOO. it must be in the main server config...as well, or it won't work
> mine works fine
>
>
> -----Original Message-----
> From: Joshua Slive [mailto:joshua@slive.ca]
> Sent: Tuesday, July 30, 2002 3:49 PM
> To: users@httpd.apache.org; admin@myispnet.net
> Cc: ken@perfect-image.com
> Subject: RE: .pl .cgi / cgi-scripts, handlers
>
>
>
> On Tue, 30 Jul 2002, admin wrote:
>
> > Look in your httpd.conf file that says:
> >
> > # If you want to use server side includes, or CGI outside
> >     # ScriptAliased directories, uncomment the following lines.
> >
> > all you do is ADD the other extension as i did.
> >
> > this is why it's not workng
>
> Uhhh... Nope.  Notice that this line says "outside ScriptAliased
> directories".  Sine he is using ScriptAlias, the AddHandler directive is
> not necessary at all.
>
> Joshua.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: .pl .cgi / cgi-scripts, handlers

Posted by Lewis Watson <li...@visionsix.com>.
I quote from the apache doc:
<quote>
"CGI programs are often restricted to ScriptAlias'ed directories for
security reasons. In this way, administrators can tightly control who is
allowed to use CGI programs. However, if the proper security precautions are
taken, there is no reason why CGI programs cannot be run from arbitrary
directories. For example, you may wish to let users have web content in
their home directories with the UserDir directive. If they want to have
their own CGI programs, but don't have access to the main cgi-bin directory,
they will need to be able to run CGI programs elsewhere.

Explicitly using Options to permit CGI execution
You could explicitly use the Options directive, inside your main server
configuration file, to specify that CGI execution was permitted in a
particular directory:

        <Directory /usr/local/apache/htdocs/somedir>
                Options +ExecCGI
        </Directory>
The above directive tells Apache to permit the execution of CGI files. You
will also need to tell the server what files are CGI files. The following
AddHandler directive tells the server to treat all files with the cgi or pl
extension as CGI programs:

     AddHandler cgi-script cgi pl"

</quote>
This  quote is  after the <scriptalias> information. ScriptAlias needs no
handler because its sole purpose in life is to provide a directory where
scripts live. My httpd.conf does not have it and does not need it.
Joshua has been helping people here for years. Do a search and see. The
problem is elsewhere.
Thanks.
Lewis


----- Original Message -----
From: "admin" <ko...@naisp.net>
To: <us...@httpd.apache.org>
Sent: Tuesday, July 30, 2002 2:52 PM
Subject: RE: .pl .cgi / cgi-scripts, handlers


> HELLOOOO. it must be in the main server config...as well, or it won't work
> mine works fine
>
>
> -----Original Message-----
> From: Joshua Slive [mailto:joshua@slive.ca]
> Sent: Tuesday, July 30, 2002 3:49 PM
> To: users@httpd.apache.org; admin@myispnet.net
> Cc: ken@perfect-image.com
> Subject: RE: .pl .cgi / cgi-scripts, handlers
>
>
>
> On Tue, 30 Jul 2002, admin wrote:
>
> > Look in your httpd.conf file that says:
> >
> > # If you want to use server side includes, or CGI outside
> >     # ScriptAliased directories, uncomment the following lines.
> >
> > all you do is ADD the other extension as i did.
> >
> > this is why it's not workng
>
> Uhhh... Nope.  Notice that this line says "outside ScriptAliased
> directories".  Sine he is using ScriptAlias, the AddHandler directive is
> not necessary at all.
>
> Joshua.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: Virtual hosts (was RE: .pl .cgi / cgi-scripts, handlers)

Posted by Joshua Slive <jo...@slive.ca>.
On Tue, 30 Jul 2002, Admin wrote:

> ahhh...thats what i thought...thanks for confirming...
> I have win2k pro can i possibly setup a DNS server on this...without
> using thr IIS server?  if so how? I'm new to w2k pro...
>
> I currently use "dns2go.com to host my dns for the main server.
> i wonder if it's possible to also host the other virtuals

I suggest you ask your dns provider if it is possible to setup a wildcard
DNS entry that will send all requests for *.example.com to your server.

Joshua.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: Virtual hosts (was RE: .pl .cgi / cgi-scripts, handlers)

Posted by Admin <ko...@naisp.net>.
ahhh...thats what i thought...thanks for confirming...
I have win2k pro can i possibly setup a DNS server on this...without
using thr IIS server?  if so how? I'm new to w2k pro...

I currently use "dns2go.com to host my dns for the main server.
i wonder if it's possible to also host the other virtuals

-----Original Message-----
From: Joshua Slive [mailto:joshua@slive.ca]
Sent: Tuesday, July 30, 2002 5:53 PM
To: users@httpd.apache.org; admin@myispnet.net
Subject: RE: Virtual hosts (was RE: .pl .cgi / cgi-scripts, handlers)



On Tue, 30 Jul 2002, Admin wrote:

> here is both my current config file, "httpd.conf"
> and i thought i'd throw in the default one i saved, just in case
> I ran into problems...this will show you that it is listed as i said.
>
> doc root takes one arguement
> root directory of the doc tree "

First, in the future, please only post relevant excerpts from your config
file unless there is a very good reason to do otherwise.  Posting entire
config files wastes both bandwidth and the time of the people answering
your questions.

On to your problem.  I see at least two issues:

1. When specifying pathnames with spaces, you must surround them with
quotation marks.  That is the cause of the doc root error.

2. From my little place on the internet, those hostnames in the ServerName
directives don't resolve to an IP address.  You need have DNS resolution
working if you expect these sites to be accessible from the internet.
For that, you should contact your DNS provider.

Good luck!

Joshua.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: Virtual hosts (was RE: .pl .cgi / cgi-scripts, handlers)

Posted by Joshua Slive <jo...@slive.ca>.
On Tue, 30 Jul 2002, Admin wrote:

> here is both my current config file, "httpd.conf"
> and i thought i'd throw in the default one i saved, just in case
> I ran into problems...this will show you that it is listed as i said.
>
> doc root takes one arguement
> root directory of the doc tree "

First, in the future, please only post relevant excerpts from your config
file unless there is a very good reason to do otherwise.  Posting entire
config files wastes both bandwidth and the time of the people answering
your questions.

On to your problem.  I see at least two issues:

1. When specifying pathnames with spaces, you must surround them with
quotation marks.  That is the cause of the doc root error.

2. From my little place on the internet, those hostnames in the ServerName
directives don't resolve to an IP address.  You need have DNS resolution
working if you expect these sites to be accessible from the internet.
For that, you should contact your DNS provider.

Good luck!

Joshua.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: Virtual hosts (was RE: .pl .cgi / cgi-scripts, handlers)

Posted by Admin <ko...@naisp.net>.
here is both my current config file, "httpd.conf"
and i thought i'd throw in the default one i saved, just in case
I ran into problems...this will show you that it is listed as i said.

the url you pointed me to is for version  2...but I'm sure it will
also be true for 1.3.x  (I've already read all the docs...)
and tried everything...so far nothing...I'm not the only one having this
problem.

I restarted and got the following errors on testing the config...

"  syntax line 1027
doc root takes one arguement
root directory of the doc tree "

> but perhaps you know how to setup virtual domains
> I've had a terrible time with those.  I've tried everything.
> and what it seems to me, I think it has something to do with
> having each sub-domain/virtual its own DNS (first) before
> setting them up in the config. I use dns2go.com to host
> my main server, But I need to setup other virtuals/subdomains
> using same IP (static).

Sure.  Start with the following:

1. Carefully read and follow
http://httpd.apache.org/docs-2.0/vhosts/name-based.html

2. If it still doesn't work, show us the relevant excerpt from your config
file and describe exactly what is happening when you try to access the
site and exactly what is in the error and access log.  It help alot if you
give real IP addresses and domain names as well.

Joshua.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

Re: Virtual hosts (was RE: .pl .cgi / cgi-scripts, handlers)

Posted by Lewis Watson <li...@visionsix.com>.
Me too. I should submit a bug that my <scriptalias> works without a handler.
Something must be wrong :)
Lewis

----- Original Message -----
From: "Joshua Slive" <jo...@slive.ca>
To: <us...@httpd.apache.org>; <ad...@myispnet.net>
Sent: Tuesday, July 30, 2002 4:16 PM
Subject: RE: Virtual hosts (was RE: .pl .cgi / cgi-scripts, handlers)


>
> On Tue, 30 Jul 2002, Admin wrote:
>
> > NO...there was nothing else i missed...
> > look...when apache first gets setup,
> > the default config file only says it will
> > execute cgi files with the extension " .cgi "
> > correct?
>
> No, that's not what the default config says.
>
> And I appologize to everyone for perpetuating this discussion.  Lets just
> end it here.  I fully believe that your server works with the AddHandler
> included.
>
> Joshua.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: Virtual hosts (was RE: .pl .cgi / cgi-scripts, handlers)

Posted by Admin <ko...@naisp.net>.
yes it does say that, in every version i've seen...
geez what is it with you people...
do you need glasses or something

even in version 2 it has that, i think...
(I installed that quickly to check it out)
I use 1.3.26 for win32  win2k pro
but i also used to operate linux
Mandrake and all those had it as well.

-----Original Message-----
From: Joshua Slive [mailto:joshua@slive.ca]
Sent: Tuesday, July 30, 2002 5:17 PM
To: users@httpd.apache.org; admin@myispnet.net
Subject: RE: Virtual hosts (was RE: .pl .cgi / cgi-scripts, handlers)



On Tue, 30 Jul 2002, Admin wrote:

> NO...there was nothing else i missed...
> look...when apache first gets setup,
> the default config file only says it will
> execute cgi files with the extension " .cgi "
> correct?

No, that's not what the default config says.

And I appologize to everyone for perpetuating this discussion.  Lets just
end it here.  I fully believe that your server works with the AddHandler
included.

Joshua.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: Virtual hosts (was RE: .pl .cgi / cgi-scripts, handlers)

Posted by Joshua Slive <jo...@slive.ca>.
On Tue, 30 Jul 2002, Admin wrote:

> NO...there was nothing else i missed...
> look...when apache first gets setup,
> the default config file only says it will
> execute cgi files with the extension " .cgi "
> correct?

No, that's not what the default config says.

And I appologize to everyone for perpetuating this discussion.  Lets just
end it here.  I fully believe that your server works with the AddHandler
included.

Joshua.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: Virtual hosts (was RE: .pl .cgi / cgi-scripts, handlers)

Posted by Admin <ko...@naisp.net>.
NO...there was nothing else i missed...
look...when apache first gets setup,
the default config file only says it will
execute cgi files with the extension " .cgi "
correct?

well, when I couldn't get it to work after going thru
countless discussions and docs,and posting of my httpd.conf file,
 someone posted that i needed to add that extension in the handler
 section of the main server global config. THAT WORKED !!!!

they couldn't find anything else wrong with the config.
at all. so I'm sorry if you disagree. I've used that method to help others
that have had the same problem...and it has worked for them as well.

It appears that the guys problem wasn't that at all. It was the 
content type set wrong, as i also suggested, if what i said didn't work.
so let's drop it.

I'll send my config, in a few
also, i already went thru countless docs about virtuals...
and posted several times...but everyone just tells me the same thing
GO LOOK AT THE DOCS...well the docs stinks as you also say.

-----Original Message-----
From: Joshua Slive [mailto:joshua@slive.ca]
Sent: Tuesday, July 30, 2002 4:53 PM
To: users@httpd.apache.org; admin@myispnet.net
Subject: Virtual hosts (was RE: .pl .cgi / cgi-scripts, handlers)


On Tue, 30 Jul 2002, Admin wrote:

> I went thru this problem before , when I first started with apache.
> I tried everything, this is the only way it works...sorry...if you
> disagree.

That's a little like saying "I couldn't get my car to start until I washed
the windows; that's the only way it works; sorry if you disagree."  In
other words, there was almost certainly something else that you missed
that changed.

> but perhaps you know how to setup virtual domains
> I've had a terrible time with those.  I've tried everything.
> and what it seems to me, I think it has something to do with
> having each sub-domain/virtual its own DNS (first) before
> setting them up in the config. I use dns2go.com to host
> my main server, But I need to setup other virtuals/subdomains
> using same IP (static).

Sure.  Start with the following:

1. Carefully read and follow
http://httpd.apache.org/docs-2.0/vhosts/name-based.html

2. If it still doesn't work, show us the relevant excerpt from your config
file and describe exactly what is happening when you try to access the
site and exactly what is in the error and access log.  It help alot if you
give real IP addresses and domain names as well.

Joshua.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: How do I get off this list?

Posted by Tom Ray <to...@blazestudios.com>.
I would try users-help@httpd.apache.org

Barrie Robinson wrote:

>Hi,
>
>Sorry for this mail, I've unsubscribed a couple of times on this email
>address to no avail. Anybody know who I can contact about this?
>
>Thanks.
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>For additional commands, e-mail: users-help@httpd.apache.org
>
>
>.
>
>  
>



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: How do I get off this list?

Posted by Joshua Slive <jo...@slive.ca>.
On Wed, 31 Jul 2002, Rodent of Unusual Size wrote:

> Barrie Robinson wrote:
> >
> > Sorry for this mail, I've unsubscribed a couple of times on this email
> > address to no avail. Anybody know who I can contact about this?
>
> Simple: Me. :-)  You're not subscribed using barrie.robinson@emotus.com,
> so you must be getting it through some other eddress.  Forward
> me a copy of this message AS AN ATTACHMENT so I can see the complete
> header, and we'll get you sorted.

Woops... Not fast enough.  I already kicked him from the list, which is
why you don't see him.  I have no idea why he was having a problem.

Joshua.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: How do I get off this list?

Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
Barrie Robinson wrote:
> 
> Sorry for this mail, I've unsubscribed a couple of times on this email
> address to no avail. Anybody know who I can contact about this?

Simple: Me. :-)  You're not subscribed using barrie.robinson@emotus.com,
so you must be getting it through some other eddress.  Forward
me a copy of this message AS AN ATTACHMENT so I can see the complete
header, and we'll get you sorted.
-- 
#ken	P-)}

Ken Coar, Sanagendamgagwedweinini  http://Golux.Com/coar/
Author, developer, opinionist      http://Apache-Server.Com/

"Millennium hand and shrimp!"

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


How do I get off this list?

Posted by Barrie Robinson <ba...@emotus.com>.
Hi,

Sorry for this mail, I've unsubscribed a couple of times on this email
address to no avail. Anybody know who I can contact about this?

Thanks.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Virtual hosts (was RE: .pl .cgi / cgi-scripts, handlers)

Posted by Joshua Slive <jo...@slive.ca>.
On Tue, 30 Jul 2002, Admin wrote:

> I went thru this problem before , when I first started with apache.
> I tried everything, this is the only way it works...sorry...if you
> disagree.

That's a little like saying "I couldn't get my car to start until I washed
the windows; that's the only way it works; sorry if you disagree."  In
other words, there was almost certainly something else that you missed
that changed.

> but perhaps you know how to setup virtual domains
> I've had a terrible time with those.  I've tried everything.
> and what it seems to me, I think it has something to do with
> having each sub-domain/virtual its own DNS (first) before
> setting them up in the config. I use dns2go.com to host
> my main server, But I need to setup other virtuals/subdomains
> using same IP (static).

Sure.  Start with the following:

1. Carefully read and follow
http://httpd.apache.org/docs-2.0/vhosts/name-based.html

2. If it still doesn't work, show us the relevant excerpt from your config
file and describe exactly what is happening when you try to access the
site and exactly what is in the error and access log.  It help alot if you
give real IP addresses and domain names as well.

Joshua.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: .pl .cgi / cgi-scripts, handlers

Posted by Admin <ko...@naisp.net>.
I went thru this problem before , when I first started with apache.
I tried everything, this is the only way it works...sorry...if you
disagree.

but perhaps you know how to setup virtual domains
I've had a terrible time with those.  I've tried everything.
and what it seems to me, I think it has something to do with
having each sub-domain/virtual its own DNS (first) before 
setting them up in the config. I use dns2go.com to host 
my main server, But I need to setup other virtuals/subdomains
using same IP (static).

-----Original Message-----
From: Joshua Slive [mailto:joshua@slive.ca]
Sent: Tuesday, July 30, 2002 4:17 PM
To: users@httpd.apache.org; admin@myispnet.net
Subject: RE: .pl .cgi / cgi-scripts, handlers


On Tue, 30 Jul 2002, admin wrote:

> hey, look this is the correct way to do it...I'm not here
> to argue, you aren't even the person having the problem...
>
> let him do it the way i suggest, and I bet it works...
> if not then, there's something else not right...
> but i don't think so, seeing as it works with the cgi ext.

I'm not trying to argue either, especially over an issue this unimportant.
(As I said, the AddHandler does no harm; it just isn't necessary.)

But I don't like to let that kind of cargo cult statement stand.  That's
how we get dangerous things like <Limit GET POST> require valid-user
</Limit> perpetuated, even though that configuration has been wrong since
Apache 1.0.  The correct, minimal configuration for a cgi-bin directory
using ScriptAlias does NOT need an AddHandler cgi-script, nor an Options
execcgi.  If you don't believe me, check the documentation, the source
code, or the default httpd.conf file.

Joshua.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: .pl .cgi / cgi-scripts, handlers

Posted by Joshua Slive <jo...@slive.ca>.
On Tue, 30 Jul 2002, admin wrote:

> hey, look this is the correct way to do it...I'm not here
> to argue, you aren't even the person having the problem...
>
> let him do it the way i suggest, and I bet it works...
> if not then, there's something else not right...
> but i don't think so, seeing as it works with the cgi ext.

I'm not trying to argue either, especially over an issue this unimportant.
(As I said, the AddHandler does no harm; it just isn't necessary.)

But I don't like to let that kind of cargo cult statement stand.  That's
how we get dangerous things like <Limit GET POST> require valid-user
</Limit> perpetuated, even though that configuration has been wrong since
Apache 1.0.  The correct, minimal configuration for a cgi-bin directory
using ScriptAlias does NOT need an AddHandler cgi-script, nor an Options
execcgi.  If you don't believe me, check the documentation, the source
code, or the default httpd.conf file.

Joshua.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: .pl .cgi / cgi-scripts, handlers

Posted by admin <ko...@naisp.net>.
hey, look this is the correct way to do it...I'm not here
to argue, you aren't even the person having the problem...

let him do it the way i suggest, and I bet it works...
if not then, there's something else not right...
but i don't think so, seeing as it works with the cgi ext.



-----Original Message-----
From: Joshua Slive [mailto:joshua@slive.ca]
Sent: Tuesday, July 30, 2002 3:57 PM
To: users@httpd.apache.org; admin@myispnet.net
Subject: RE: .pl .cgi / cgi-scripts, handlers


On Tue, 30 Jul 2002, admin wrote:

> HELLOOOO. it must be in the main server config...as well, or it won't work
> mine works fine

No.  That's not true.  I'm sure yours works fine, but if you are using
ScriptAlias, you do not need AddHandler (nor do you need "Options
ExecCGI").  They do no harm, but they do no good either.

Joshua.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: .pl .cgi / cgi-scripts, handlers

Posted by Joshua Slive <jo...@slive.ca>.
On Tue, 30 Jul 2002, admin wrote:

> HELLOOOO. it must be in the main server config...as well, or it won't work
> mine works fine

No.  That's not true.  I'm sure yours works fine, but if you are using
ScriptAlias, you do not need AddHandler (nor do you need "Options
ExecCGI").  They do no harm, but they do no good either.

Joshua.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: .pl .cgi / cgi-scripts, handlers

Posted by admin <ko...@naisp.net>.
HELLOOOO. it must be in the main server config...as well, or it won't work
mine works fine


-----Original Message-----
From: Joshua Slive [mailto:joshua@slive.ca]
Sent: Tuesday, July 30, 2002 3:49 PM
To: users@httpd.apache.org; admin@myispnet.net
Cc: ken@perfect-image.com
Subject: RE: .pl .cgi / cgi-scripts, handlers



On Tue, 30 Jul 2002, admin wrote:

> Look in your httpd.conf file that says:
>
> # If you want to use server side includes, or CGI outside
>     # ScriptAliased directories, uncomment the following lines.
>
> all you do is ADD the other extension as i did.
>
> this is why it's not workng

Uhhh... Nope.  Notice that this line says "outside ScriptAliased
directories".  Sine he is using ScriptAlias, the AddHandler directive is
not necessary at all.

Joshua.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: .pl .cgi / cgi-scripts, handlers

Posted by Joshua Slive <jo...@slive.ca>.
On Tue, 30 Jul 2002, admin wrote:

> Look in your httpd.conf file that says:
>
> # If you want to use server side includes, or CGI outside
>     # ScriptAliased directories, uncomment the following lines.
>
> all you do is ADD the other extension as i did.
>
> this is why it's not workng

Uhhh... Nope.  Notice that this line says "outside ScriptAliased
directories".  Sine he is using ScriptAlias, the AddHandler directive is
not necessary at all.

Joshua.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: .pl .cgi / cgi-scripts, handlers

Posted by admin <ko...@naisp.net>.
Look in your httpd.conf file that says:

# If you want to use server side includes, or CGI outside
    # ScriptAliased directories, uncomment the following lines.
    #
    # To use CGI scripts:
    #
    AddHandler cgi-script .cgi .pl

all you do is ADD the other extension as i did.

this is why it's not workng


-----Original Message-----
From: Ken Godee [mailto:ken@perfect-image.com]
Sent: Tuesday, July 30, 2002 3:40 PM
To: users@httpd.apache.org
Subject: .pl .cgi / cgi-scripts, handlers


I know this has been talked about alot, but I've combed
thru the email list/faq and have tried many things, but still can't
get it working right. I don't want to make this drawn out, but if
someone has an easy solution it would be great.

Apache 1.3.26 (compiled with modules)
Rh 7.1

I have the "same" 2 scripts with dif. ext's "first.pl" and "first.cgi"
On "client" browers first.cgi executes as normal, but first.pl wants 
to download instead of executing :(
On the server that Apache is running on, both versions execute 
correctly! (thru browser)  (logged in as root or normal user)

Browsers on both machines are going thru squid proxy.

Permissions (as far as I know) are configured correctly.

[root@cpq866 cgi-bin]# pwd
   /var/www/cgi-bin
[root@cpq866 cgi-bin]# l
   -rwxr-xr-x    1 root     root          272 Jul 30 08:35 first.cgi
   -rwxr-xr-x    1 root     root          272 Jul 26 17:23 first.pl
Tried chowning apache.apache * (no help)

httpd.conf has;

ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"

<Directory "/var/www/cgi-bin">
    AllowOverride None
    AddHandler cgi-script cgi pl
    Options ExecCGI
    Order allow,deny
    Allow from all
</Directory>

 "AddHandler cgi-script cgi pl" inside or outside of 
directive makes no dif. Either does "." as in ".cgi" ".pl"

No errors in error.log

Mod_cgi is compiled into Apache as verified by httpd -l

cgi-bin has no .htaccess file

Only one httpd.conf on system.

I can always just name perl scripts with the ".cgi" instead
of ".pl" to get them to work, but I hate doing things like
that.
Any help would be great.
TIA

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: .pl .cgi / cgi-scripts, handlers

Posted by Joshua Slive <jo...@slive.ca>.
On Tue, 30 Jul 2002, Ken Godee wrote:
> I have the "same" 2 scripts with dif. ext's "first.pl" and "first.cgi"
> On "client" browers first.cgi executes as normal, but first.pl wants
> to download instead of executing :(
> On the server that Apache is running on, both versions execute
> correctly! (thru browser)  (logged in as root or normal user)

Uhhh... That implies to mean only one thing: the scripts are working fine,
but you are setting the Content-Type wrong in the scripts and the
"wonderful" MSIE is using its silly extensions mapping to figure out what
to do.

Try checking the content-type line output by the script, and give us a
test url so we can look at the output of the two scripts.

Joshua.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org