Re: Another Perl/Apache question

2001-08-30 Thread Remco Schaar

On Wed, 29 Aug 2001, Mathew Benson wrote:

Hi,

   I know you helped me before, but I had to rebuild my server and now I'm 
 having the same problem as before.  I changed my ServerName directive to the 
 correct IP address (I don't have a DNS name).  These are the only other 
 changes I made to httpd.conf:
 
 # FOR MOD_PERL:
 PerlModule Apache::Registry
 KeepAlive Off
 
 Alias /dm/ /var/www/html/dm/
 Location /dm
 SetHandler perl-script
 PerlHandler Apache::Registry
 Options ExecCGI
 allow from all
 PerlSendHeader On
 /Location
 
 Redirect /demarc http://10.1.6.42/dm/demarc

Looks quite sound to me...

   I originally tried making the changes you suggested before, but that 
 didn't do anything. The source code still came straight through.

Which source code shows up? Your DirectoryIndex script, or another
file? (I suppose a perl-source, not the html-source, otherwise you need
to check mime-types)

   I know  the perl script works, because I can run it from the
 console. After playing with things I was able to get the browser to sit
 there for a few seconds, and display a server error message.

According to their documentation I skimmed, using mod_perl is
optional. Perhaps you might want to run it on plain mod_cgi to test it all
out? Once it runs through the web, then throw in mod_perl again.

What modifications did you made, what were the resulting http-errors, and
what was the error.log telling you when you were playing around?

   I've since learned that the documentation from the www.demarc.org site on 
 installing the software is lacking and very problematic.  One change I had 
 to make was to the base html directory.  Their instructions say that it 
 would be /usr/local/www/, but on my machine it was /var/www/html/.

You could try a grep on their code to check for the /local/www/ path, they
could have some nasty hard-coded ones (they probably won't be the
first)...

   The strangest thing is when I tried to hit http://10.1.6.42/demarc, I got 
 a bunch of pop ups saying something about the server sending a certificate.  
 I was browsing the page from my Linux box and the text is very small and 
 hard to read, so I just kept clicking Ok and Next.  It finally redirected to 
 http://10.1.6.42/dm/demarc, but wound up with the same server error.  I 
 didn't setup https, so I don't understand why it would have sent the browser 
 a certificate.

What is the result when you requested the document directly (like with
telnet or a lwp-request). This should turn out to be a redirect
response. Try every followiung request manually in the same, since
brwosers might do _lot's_ of things you hardly notice.

   Any help would be much appreciated.  I'm helping somebody else install the 
 same software, so I imagine he's going to run into same problem and I'd like 
 to be able help him through it.

Bye,
Remco


P.S: Please use the mod_perl maillinglist as addressee or at least as
CC, since more people will read it and can be able to help you solve
your problem, thus including more expertism. This might lead to faster /
better help.









Re: Perl/Apache question

2001-08-28 Thread Chris Fry

UNSUBSCRIBE





Perl/Apache question

2001-08-26 Thread Mathew Benson

  I sincerely appologize if this question is in the wrong mailing list.  But 
I'm not really sure where it belongs.
  I installed Demarc and Snort.  Demarc is a Perl script, which does work 
when executed from the console.  But when hit from the web, it just returns 
the source code.  How do I configure Apache so it executes the Perl script 
instead of sending the contents of the script?

_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp




Re: Perl/Apache question

2001-08-26 Thread Remco Schaar

On Sun, 26 Aug 2001, Mathew Benson wrote:

Hi,

   I sincerely appologize if this question is in the wrong mailing list.  But 
 I'm not really sure where it belongs.
   I installed Demarc and Snort.  Demarc is a Perl script, which does work 
 when executed from the console.  But when hit from the web, it just returns 
 the source code.  How do I configure Apache so it executes the Perl script 
 instead of sending the contents of the script?

You probably misconfigured. What you might need is to add a handler to run
this script. The easiest way will be something like:
AddHandler perl-script .pl
PerlHandler +Apache::Registry
or some modification hereof. You may need more, depending on your
current configuration. Check the guide:
http://perl.apache.org/guide
for all information you need.

Bye,
Remco




Re: Perl/Apache question

2001-08-26 Thread Ged Haywood

Hi there,

On Sun, 26 Aug 2001, Remco Schaar wrote:

 On Sun, 26 Aug 2001, Mathew Benson wrote:
 
I sincerely appologize if this question is in the wrong mailing list.
But I'm not really sure where it belongs.
I installed Demarc and Snort.  [snip]
 
 You probably misconfigured. What you might need is to add a handler to run
 this script. The easiest way will be something like:
   AddHandler perl-script .pl
   PerlHandler +Apache::Registry
 or some modification hereof. You may need more, depending on your
 current configuration. Check the guide:
   http://perl.apache.org/guide

This of course assumes Mr. Benson is using mod_perl.

Is he?

73,
Ged.




Re: Perl/Apache question

2001-08-26 Thread Remco Schaar

On Sun, 26 Aug 2001, Ged Haywood wrote:

 Hi there,

hi,

 On Sun, 26 Aug 2001, Remco Schaar wrote:
 
  On Sun, 26 Aug 2001, Mathew Benson wrote:
  
 I sincerely appologize if this question is in the wrong mailing list.
 But I'm not really sure where it belongs.
 I installed Demarc and Snort.  [snip]
  
  You probably misconfigured. What you might need is to add a handler to run
  this script. The easiest way will be something like:
  AddHandler perl-script .pl
  PerlHandler +Apache::Registry
  or some modification hereof. You may need more, depending on your
  current configuration. Check the guide:
  http://perl.apache.org/guide
 
 This of course assumes Mr. Benson is using mod_perl.
 
 Is he?

Oh, you're right... But testing that is in the guide as well :-)

 73,
 Ged.

Bye,
remco