Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Feb 2002 09:23:45 -0500
From:      mpd <mpd6334@cs.rit.edu>
To:        Matt H <matt@proweb.co.uk>
Cc:        questions@freebsd.org
Subject:   Re: apache/mod perl not friendly - solved
Message-ID:  <20020211092345.A83803@rochester.rr.com>
In-Reply-To: <20020211135906.36d241dd.matt@proweb.co.uk>; from matt@proweb.co.uk on Mon, Feb 11, 2002 at 01:59:06PM %2B0000
References:  <20020210193323.A38732@rochester.rr.com> <20020211135906.36d241dd.matt@proweb.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Feb 11, 2002 at 01:59:06PM +0000, Matt H wrote:
> On Sun, 10 Feb 2002 19:33:23 -0500
> "mpd" <mpd6334@cs.rit.edu> wrote:
> 
> > Hi,
> > 
> > I felt like doing something new, so I installed mod_perl.
> 
> I can fully recommend O'Reilly's "Writing Apache Modules with perl and c"
> as seen at http://www.modperl.com

Yep, borrowing a copy now, will probably buy it soon.

> 
> Another good place to look of course is :
> http://perl.apache.org/

Not when you can't get it to work in the first place. Their
documentation is sadly lacking in that dept. Once I was up
and running, that site is gold.

> 
> Anyway here's an example :
> 
> ----- file : /usr/local/lib/perl/Apache/Hello.pm  -------
> 
> package Apache::Hello;
> 
> use Apache::Constants qw(:common);
> 
> sub handler {
>         my $r = shift;
>         $r->content_type('text/html');
>         $r->send_http_header;
>         $r->print("<HTML><BODY>HI</BODY></HTML>");
>         return OK;
> }
> 1;
> 
> ------- httpd.conf entry --------------
> 
> <VirtualHost *>
> 
> .. snip other stuff ...
> 
>     <Location /hello>
> 	SetHandler perl-script
> 	PerlHandler Apache::Hello
>     </Location>
> 
> </VirtualHost>

The lack of any <Location> stuff ended up being the problem.
I guess that's what happens when you edit the wrong conf file.

thanks,

mike
-- 
___________________________________________________________
 
"HER NAME, MY YOUNG FRIEND, IS APPARENTLY HEADCHEESE."
	- Pokey the Penguin from "POKEY THE PENGUIN AND HEADCHEESE"

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020211092345.A83803>