httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "TD - Sales International Holland B.V." ...@salesint.com>
Subject Re: CGI-BIN & Perl scripts
Date Mon, 28 Jan 2002 10:36:11 GMT
On Friday 25 January 2002 16:08, you wrote:

Yea now it works.... Thanks

Some notes:

I compiled 1.3.22 like this (with mod_ssl)
./configure --prefix=/usr/local/apache --with-perl=/usr/bin/perl 
--enable-module=so --enable=module=ssl --enable-module=rewrite 
--enable-shared=rewrite --server-uid=50 --server-gid=60 
--disable-module=userdir

Now, according to the docs mod_cgi gets built by default (I didn't disable 
it), appearantly it did too but there was NO line for mod_cgi in my config 
file, I had to add it. After adding it at first I didn't get anything anymore 
from the CGI-BIN dir. (just blank pages, infact, the previous page I had 
visited kept showing in my netscape). I figured this might had something to 
do with the order in which the modules were loaded so I looked on another box 
and saw mod_cgi got loaded in between mod_dir and mod_asis so I put it in 
between those and then it worked fine. The order in which modules need to be 
loaded is still a bit vague to me. Does anyone have any docs on that?

Kind regards


> I don't see mod_cgi as being enabled. I think you need it.
>
> -Andy
>
> On Fri, 25 Jan 2002 14:30:34 +0100
>
> "TD - Sales International Holland B.V." <td@salesint.com> wrote:
> > On Friday 25 January 2002 13:34, you wrote:
> >
> > thanks :-) but I made that mistake typing it into my email editor, they
>
> are
>
> > in the file. I know it's correct since if I run (on the command prompt)
> > ./test.pl I get:
> > Content-Type: text/html
> >
> > <HTML><BODY>bla bla</BODY></HTML>
> >
> > any ideas?
> > +ExecCGI didn't help either. Perhaps I need something like AddHandler,
>
> but
>
> > I'm not too sure about that. I configured it from scratch this time but
>
> on
>
> > some of my other puters with a default apache install (from distro) it
> > doesn't matter which extension I give my files as long as I chmod +x em.
> >
> > Besides, if I'm not mistaken, if I use AddHandler I'll be in trouble
>
> because
>
> > the .pl files will then be executed wherever they are right? Not just in
>
> the
>
> > cgi-bin dir, which is what I want. Doing this from scratch so I have a
>
> better
>
> > understanding of the server and it's security implications.
> >
> > I disabled some modules perhaps that's it but I don't think so.
> > These are the enabled!! modules:
> >
> > env
> > log_config
> > mime
> > negotiation
> > status
> > autoindex
> > dir
> > alias
> > access
> > auth
> > so
> > php4 (DSO)
> > ssl (compiled in, not DSO thus)
> >
> > disabled modules:
> >
> > include
> > asis
> > imap
> > actions
> > rewrite (DSO)
> >
> > All other modules are NOT compiled. I disabled the above ones because I
>
> have
>
> > no need for them.
> >
> > Kind regards
> >
> > > Your missing a quote & a semicolon. It should be
> > >
> > > #!/usr/bin/perl
> > > print "Content-type: text/html\n\n";
> > > print "<HTML><BODY>bla bla</BODY></HTML>";
> > >
> > >
> > > -=- RuneImp
> > > ImpTech - Web Design, Hosting & Computer Tech
> > > http://imptech.net
> > > rune@imptech.net
> > >
> > >
> > > ----- Original Message -----
> > > From: "TD - Sales International Holland B.V." <td@salesint.com>
> > > To: <users@httpd.apache.org>
> > > Sent: Friday, January 25, 2002 4:21 AM
> > > Subject: CGI-BIN & Perl scripts
> > >
> > >
> > > Hey there,
> > >
> > > I made a simple perl script like this:
> > > #!/usr/bin/perl
> > > print "Content-type: text/html\n\n";
> > > print "<HTML><BODY>bla bla</BODY></HTML>
> > >
> > > file is name test.pl, permissions
> > > -rwxr-xr-x root, root, other
> > > ./test.pl works as expected
> > > in httpd.conf:
> > > ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
> > >
> > > <Directory "/var/www/cgi-bin">
> > >   AllowOverride None
> > >   Options None
> > >   Order Allow,Deny
> > >   Allow from all
> > > </Directory>
> > >
> > > when going to
> > > http://myserver/cgi-bin/test.pl
> > > I just get the contents of the file, also html files can be served
>
> from the
>
> > > directory (although it doesn't recognize index files
> > > (myserver.tld/cgi-bin/index.html will show the index file but
> > > myserver.tld/cgi-bin/ will give no such file or directory). I was
>
> under the
>
> > > assumption anything in a scriptalias directory would be executed but
>
> it
>
> > > doesn't look like it....
> > >
> > > Any ideas?
> > >
> > > Kind regards
> > >
> > > ---------------------------------------------------------------------
> > > 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
> > >
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > 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
> >
> > ---------------------------------------------------------------------
> > 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
>
> ---------------------------------------------------------------------
> 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

---------------------------------------------------------------------
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


Mime
View raw message