RE: [win32] new perl/apache/mod_perl binary

2002-07-08 Thread Alessandro Forghieri

Greetings

[...]
 there's a better way - if anyone's familiar with this, could you
 drop me a mine, privately? Thanks.
^

Are you sure this is *really* what you want? :
(Sorry I could not resist).
Cheers,
alf



Perl sections

2002-07-08 Thread Mike Blazer

Hi All,

I'm developing a multi-httpd configuration with the http accelerating
proxy, well practically the same that was described in the Apache
mod_perl guide. 2 httpd+mod_perl - one for very fast process with low
need in modules, and the other one for statistics, near 1MB of modules,
much slower in comparence with the 1st one. And the 3rd -
httpd+mod_proxy (or may be mod_accel by Igor Sysoev that I've read about
only yesterday :)

Right now this all happens on one and the same machine with one
ip-address. So, I've got the idea to attach busy mod_perl httpds to some
unusual ports on 127.0.0.1 and make them available from localhost only.
While proxy is supposed to handle 7+ name based virtual hosts (the
number is DB-dependent)

OK, this goes OK so far (cross fingers). Before this poin it worked very
nice on one httpd with the large Perl section that includes DB call to
find out which virtual hosts to initiate. But now with this
httpd+mod_proxy I can't use Perl section because it shouldn't use
mod_perl, right? It's supposed to be lightweight.

Well, the question is, what if I'll load mod_perl only for Perl
section parsing and generating the dynamic config with
Apache-httpd_conf method, and no real mod_perl locations - would this
still make server childs much bigger then without mod_perl?

Sorry, as I'm mainly on Win32 and the production server is now built
statically, I'm a little limited in experiments loading modules. I'd
like to know also would the child-servers size depend on static/DSO
installation of the proxy-httpd with mod_perl (again - to run on server
statup only and parse Perl sections only). May be DSO httpd will load
mod_perl.so on startup and not copy it to child servers as they don't
need it?

Or may be there is some way to un-load mod_perl after Perl sections
processing?

Thanks, any input is much appreciated
-- 
==
Mike Blazer
[EMAIL PROTECTED]
==



Re: Perl sections

2002-07-08 Thread Ilya Martynov

 On Mon, 08 Jul 2002 18:39:04 +0400, Mike Blazer [EMAIL PROTECTED] said:

MB Hi All,

MB [..snip..]

MB Well, the question is, what if I'll load mod_perl only for Perl
MB section parsing and generating the dynamic config with
MB Apache- httpd_conf method, and no real mod_perl locations - would this
MB still make server childs much bigger then without mod_perl?

Yes, it will.

MB [..snip..]

MB Or may be there is some way to un-load mod_perl after Perl sections
MB processing?

If you need Perl sections only to do initial web server
configuration and you do not need mod_perl features in runtime then
instead of using Perl just write Perl script to generate Apache
config file from templates and run it before starting Apache. This way
you do not need mod_perl on frontend Apache at all.

-- 
Ilya Martynov (http://martynov.org/)



Re: Perl sections

2002-07-08 Thread Mike Blazer

 MB Or may be there is some way to un-load mod_perl after Perl sections
 MB processing?
 
 If you need Perl sections only to do initial web server
 configuration and you do not need mod_perl features in runtime then
 instead of using Perl just write Perl script to generate Apache
 config file from templates and run it before starting Apache. This way
 you do not need mod_perl on frontend Apache at all.


Yes, sure, that was my backup idea :) But I just wanted to make all 3
configs in one big file, because of tons of the parameters (like log
names, leves, auth, ssl etc). To keep it all together and start with -D
proxy or -D pages.

Thanks, but this would stay for the last chance :)
-- 
==
Mike Blazer
[EMAIL PROTECTED]
==



QUESTION - Apache::AuthenCache

2002-07-08 Thread JOSE SOLE

Hey mod_perl users,

I am trying to use Apache::AuthenCache as my authentication handler for my server.  I 
keep getting a FORBIDDEN error each time I try to access the index.html page by only 
typing the URL up to the directory.

Example:

//FORBIDDEN ERROR
http://elvis.arl.psu.edu:9092/footer

//IT WORKS
http://elvis.arl.psu.edu:9092/footer/
http://elvis.arl.psu.edu:9092/footer/index.html

I have Embedded Perl version 5.00503 for Apache/1.3.26 (Unix) mod_perl/1.27 

It works if I use  $r-notes('AuthenCache' = 'hit') in the AuthenCache code, which 
doesn't make sense.  I should be allowed to use
set_handlers() with my version of mod_perl.

I will appreciate any AuthenCache users help on solving this frustrating bug. Let me 
know any additional information that I should post. Thanks.

Jose J Sole
[EMAIL PROTECTED]




leaks with Apache::Request?

2002-07-08 Thread Dave Rolsky

It looks like there may be a memory leak with Apache::Request.  I'm using
version 1.0 with Perl 5.6.1, mod_perl 1.26, and Apache 1.3.26.  mod_perl
is statically compiled into Apache.

Here's some code that I think demonstrates the leak:

  package My::APRTest;

  use strict;

  use Apache::Request;
  sub Apache::Request::DESTROY{warn DEAD: $_[0]\n}
  sub handler
  {
  my $r = shift;
  $r = Apache::Request-new($r);

  $r-send_http_header;
  $r-print('apr test');

  return 200;
  }

  1;

When I run this, the DESTROY method is not called until the server shuts
down.

Watching memory using with top (against a server running as httpd -X) I
can see that memory usage is growing a little less the 500K every 5000
requests.

This isn't catastrophic but fixing it would be a good thing.


-dave

/*==
www.urth.org
we await the New Sun
==*/




modperl-2.0 make Error on Solaris

2002-07-08 Thread Kent, Mr. John

Greetings,

Following:
Create the build environment
   % cd modperl-2.0
   % perl Makefile.PL MP_AP_PREFIX=/home/stas/src/httpd-2.0.xx
   % make

on Solaris 2.7

got:
make[3]: Entering directory
`/users/webuser/src/modperl-2.0/WrapXS/APR/Table'
gcc -c -I/users/webuser/src/modperl-2.0/src/modules/perl
-I/users/webuser/src/modperl-2.0/xs
-I/users/webuser/apache_heavy_test/include -I/usr/local/include  -DMOD_PERL
-O   -DVERSION=\0.01\ -DXS_VERSION=\0.01\ -fPIC
-I/users/webuser/perl/lib/5.6.1/sun4-solaris-thread-multi/CORE  Table.c
In file included from
/users/webuser/src/modperl-2.0/src/modules/perl/modperl_perl_includes.h:42,
 from
/users/webuser/src/modperl-2.0/src/modules/perl/mod_perl.h:5,
 from Table.xs:18:
/users/webuser/perl/lib/5.6.1/sun4-solaris-thread-multi/CORE/perl.h:23:
warning: `VOIDUSED' redefined
/users/webuser/perl/lib/5.6.1/sun4-solaris-thread-multi/CORE/config.h:3118:
warning: this is the location of the previous definition
/users/webuser/src/modperl-2.0/xs/APR/Table/APR__Table.h: In function
`mpxs_apr_table_do':
In file included from Table.xs:26:
/users/webuser/src/modperl-2.0/xs/APR/Table/APR__Table.h:73: dereferencing
pointer to incomplete type
make[3]: *** [Table.o] Error 1
make[3]: Leaving directory `/users/webuser/src/modperl-2.0/WrapXS/APR/Table'
make[2]: *** [subdirs] Error 2
make[2]: Leaving directory `/users/webuser/src/modperl-2.0/WrapXS/APR'
make[1]: *** [subdirs] Error 2
make[1]: Leaving directory `/users/webuser/src/modperl-2.0/WrapXS'
make: *** [subdirs] Error 2

Thanks,

John Kent
Webmaster
Naval Research Laboratory,
Monterey, CA




Re: QUESTION - Apache::AuthenCache

2002-07-08 Thread darren chamberlain

* JOSE SOLE [EMAIL PROTECTED] [2002-07-08 14:24]:
 I am trying to use Apache::AuthenCache as my authentication handler
 for my server.  I keep getting a FORBIDDEN error each time I try to
 access the index.html page by only typing the URL up to the directory.
 
 Example:
 
 //FORBIDDEN ERROR
 http://elvis.arl.psu.edu:9092/footer
 
 //IT WORKS
 http://elvis.arl.psu.edu:9092/footer/
 http://elvis.arl.psu.edu:9092/footer/index.html

Add some debugging to the handler to ensure that the client is sending
the WWW-Authenticate header to both /footer and /footer/.  The
browser sees them as different locations (the first is a file named
footer, the second is a directory name footer), and possibly doesn't
consider the first to be within the auth realm for which it has a
username/password.

Apache's mod_dir usually Does The Right Thing here, when given the
chance; are you using a perl-handler on Location /?

(darren)

-- 
It is wrong always, everywhere and for everyone to believe
anything upon insufficient evidence.
-- W. K. Clifford, British philosopher, circa 1876



Re: leaks with Apache::Request?

2002-07-08 Thread Richard Clarke

Dave,
Perhaps this is why from the eagle book,
During the child exit phase, mod_perl invokes the Perl API function 
perl_destruct( ) to run the contents of END blocks and to invoke the 
DESTROY method for any global objects that have not gone out of scope 
already.
So I think i'm right in saying that, When I run this, the DESTROY 
method is not called until the server shuts down. is perfectly normal 
behaviour. I don't know how you are actually testing your memory 
usage, but I might suggest that if you are sending larger amounts of 
data than previously, just once per 5000 requests then this memory is 
gonna be consumed by apache forever (at least until httpd is killed).

Richard


Dave Rolsky wrote:

It looks like there may be a memory leak with Apache::Request.  I'm using
version 1.0 with Perl 5.6.1, mod_perl 1.26, and Apache 1.3.26.  mod_perl
is statically compiled into Apache.

Here's some code that I think demonstrates the leak:

  package My::APRTest;

  use strict;

  use Apache::Request;
  sub Apache::Request::DESTROY{warn DEAD: $_[0]\n}
  sub handler
  {
  my $r = shift;
  $r = Apache::Request-new($r);

  $r-send_http_header;
  $r-print('apr test');

  return 200;
  }

  1;

When I run this, the DESTROY method is not called until the server shuts
down.

Watching memory using with top (against a server running as httpd -X) I
can see that memory usage is growing a little less the 500K every 5000
requests.

This isn't catastrophic but fixing it would be a good thing.


-dave

/*==
www.urth.org
we await the New Sun
==*/



  






Re: leaks with Apache::Request?

2002-07-08 Thread Dave Rolsky

On Mon, 8 Jul 2002, Richard Clarke wrote:

 During the child exit phase, mod_perl invokes the Perl API function
 perl_destruct( ) to run the contents of END blocks and to invoke the
 DESTROY method for any global objects that have not gone out of scope
 already.

Notice where it says ... for any global objects that have not gone out of
scope already.

In the code I posted, $r goes out of scope at the end of the handler
subroutine.

 So I think i'm right in saying that, When I run this, the DESTROY
 method is not called until the server shuts down. is perfectly normal
 behaviour. I don't know how you are actually testing your memory

Well, creating an Apache::DESTROY method works and shows the Apache object
going out of scope on a per-request basis.

 usage, but I might suggest that if you are sending larger amounts of
 data than previously, just once per 5000 requests then this memory is
 gonna be consumed by apache forever (at least until httpd is killed).

I tested with ab sending the same request thousands of times in a row.


-dave

/*==
www.urth.org
we await the New Sun
==*/




Re: [OT] Better Linux server platform: Redhat or SuSe?

2002-07-08 Thread Ganesan M


 
 Schoolmaster.net, 167,000 lines of Perl code, another 30,000 lines of C.
 
 Rich.
 
How do you run 'C' code from Apache/mod_perl?

G.




Re: [OT] Better Linux server platform: Redhat or SuSe?

2002-07-08 Thread Owen Scott Medd

On Mon, 8 Jul 2002, Ganesan M wrote:
  Schoolmaster.net, 167,000 lines of Perl code, another 30,000 lines of C.
  
  Rich.
  
 How do you run 'C' code from Apache/mod_perl?

Using the perl XS interface usually... that's how we access our text 
analysis routines which are in C.

Owen
-- 
USMail:   InterGuide Communications, 230 Lyn Anne Court, Ann Arbor, MI 48103
phone:+1 734 997-0922   fax:+1 734 661-0324
mailto:[EMAIL PROTECTED]   http://www.interguide.com/~osm/

[ Sometimes wrong.  Never in doubt. ]




Re: Perl sections

2002-07-08 Thread Perrin Harkins

Mike Blazer wrote:
MB Or may be there is some way to un-load mod_perl after Perl sections
MB processing?

If you need Perl sections only to do initial web server
configuration and you do not need mod_perl features in runtime then
instead of using Perl just write Perl script to generate Apache
config file from templates and run it before starting Apache. This way
you do not need mod_perl on frontend Apache at all.
 
 Yes, sure, that was my backup idea :) But I just wanted to make all 3
 configs in one big file, because of tons of the parameters (like log
 names, leves, auth, ssl etc). To keep it all together and start with -D
 proxy or -D pages.

Well of course you can do exactly that with what Ilya suggested: one 
template file that your script uses to generate appropriate conf files 
for each server.  It's really your only choice for a proxy server.  It's 
also somewhat safer, since it means your database doesn't have to be up 
just to start your proxy server.

- Perrin




Re: Perl sections

2002-07-08 Thread Mike Blazer



Perrin Harkins wrote:
 
 Mike Blazer wrote:
 MB Or may be there is some way to un-load mod_perl after Perl sections
 MB processing?
 
 If you need Perl sections only to do initial web server
 configuration and you do not need mod_perl features in runtime then
 instead of using Perl just write Perl script to generate Apache
 config file from templates and run it before starting Apache. This way
 you do not need mod_perl on frontend Apache at all.
 
  Yes, sure, that was my backup idea :) But I just wanted to make all 3
  configs in one big file, because of tons of the parameters (like log
  names, leves, auth, ssl etc). To keep it all together and start with -D
  proxy or -D pages.
 
 Well of course you can do exactly that with what Ilya suggested: one
 template file that your script uses to generate appropriate conf files
 for each server.  It's really your only choice for a proxy server.  It's
 also somewhat safer, since it means your database doesn't have to be up
 just to start your proxy server.

Yeah, thanks. But the whole that site has nothing to do without the
database :) It almost has no static content.
But seems like you are both right. Template would be really safer. While
this also breaks the nice concept of starting each server with apachectl
-D name and having all confugurables (perl vars, hashes) together in
the same file.
-- 
==
Mike Blazer
[EMAIL PROTECTED]
==



Re: modperl-2.0 make Error on Solaris

2002-07-08 Thread Randy Kobes

On Mon, 8 Jul 2002, Kent, Mr. John wrote:

 Greetings,

 Following:
 Create the build environment
% cd modperl-2.0
% perl Makefile.PL MP_AP_PREFIX=/home/stas/src/httpd-2.0.xx
% make

 on Solaris 2.7

 got:
 make[3]: Entering directory
 `/users/webuser/src/modperl-2.0/WrapXS/APR/Table'
 gcc -c -I/users/webuser/src/modperl-2.0/src/modules/perl
 -I/users/webuser/src/modperl-2.0/xs
 -I/users/webuser/apache_heavy_test/include -I/usr/local/include  -DMOD_PERL
 -O   -DVERSION=\0.01\ -DXS_VERSION=\0.01\ -fPIC
 -I/users/webuser/perl/lib/5.6.1/sun4-solaris-thread-multi/CORE  Table.c
 In file included from
 /users/webuser/src/modperl-2.0/src/modules/perl/modperl_perl_includes.h:42,
  from
 /users/webuser/src/modperl-2.0/src/modules/perl/mod_perl.h:5,
  from Table.xs:18:
 /users/webuser/perl/lib/5.6.1/sun4-solaris-thread-multi/CORE/perl.h:23:
 warning: `VOIDUSED' redefined
 /users/webuser/perl/lib/5.6.1/sun4-solaris-thread-multi/CORE/config.h:3118:
 warning: this is the location of the previous definition
 /users/webuser/src/modperl-2.0/xs/APR/Table/APR__Table.h: In function
 `mpxs_apr_table_do':
 In file included from Table.xs:26:
 /users/webuser/src/modperl-2.0/xs/APR/Table/APR__Table.h:73: dereferencing
 pointer to incomplete type
 make[3]: *** [Table.o] Error 1

I'm not sure if this is related, but with the cvs httpd-2.0 I get
an error in about the same place. If one places the definition of
apr_table_t in httpd-2.0/srclib/apr/tables/apr_tables.c:

struct apr_table_t {
  apr_array_header_t a;
#ifdef MAKE_TABLE_PROFILE
  void *creator;
#endif
};

into MP_AP_PREFIX/include/apr_tables.h, just after the
struct apr_array_header_t declaration, then things compiled
for me, and all tests pass.

best regards,
randy kobes




Re: Perl sections

2002-07-08 Thread Randal L. Schwartz

 Mike == Mike Blazer [EMAIL PROTECTED] writes:

Mike Yeah, thanks. But the whole that site has nothing to do without the
Mike database :) It almost has no static content.
Mike But seems like you are both right. Template would be really safer. While
Mike this also breaks the nice concept of starting each server with apachectl
Mike -D name and having all confugurables (perl vars, hashes) together in
Mike the same file.

Solution:

generate

httpd.conf.pages
httpd.conf.proxy

using Template Toolkit.  Easy'nuff.  Lots of common stuff, plus unique
stuff.  You can use tpage and then there's not even any programming:

httpd.conf.pages: httpd.conf.tmpl
tpage --define server=pages  $  $@
httpd.conf.proxy: httpd.conf.tmpl
tpage --define server=proxy  $  $@

then check [% IF server = 'pages'; ... ; END %] in your templates.

Make httpd.conf be simply:

ifdefine pages
Include httpd.conf.pages
/ifdefine
ifdefine proxy
Include httpd.conf.proxy
/ifdefine
ifdefine !pages
ifdefine !proxy
Include httpd.conf.other
/ifdefine
/ifdefine

Done. :)

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
[EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!



Re: Perl sections

2002-07-08 Thread Randal L. Schwartz

 Randal == Randal L Schwartz [EMAIL PROTECTED] writes:

Randal using Template Toolkit.  Easy'nuff.  Lots of common stuff, plus unique
Randal stuff.  You can use tpage and then there's not even any programming:

Randal httpd.conf.pages: httpd.conf.tmpl
Randal tpage --define server=pages  $  $@
Randal httpd.conf.proxy: httpd.conf.tmpl
Randal tpage --define server=proxy  $  $@

Randal then check [% IF server = 'pages'; ... ; END %] in your templates.

Or duh, even simpler:

[%
  FOREACH server = ['pages', 'proxy'];
FILTER redirect(httpd.conf.$server);
-%]
... everything else ...
[%
END; # filter redirect
  END; # foreach
-%]

Then just tpage the file, and you've got a new version!

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
[EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!



Re: leaks with Apache::Request?

2002-07-08 Thread Joe Schaefer

Dave Rolsky [EMAIL PROTECTED] writes:

[...]

 Here's some code that I think demonstrates the leak:
 
   package My::APRTest;
 
   use strict;
 
   use Apache::Request;
   sub Apache::Request::DESTROY{warn DEAD: $_[0]\n}
   sub handler
   {
   my $r = shift;
   $r = Apache::Request-new($r);
^

Write that like this, and I think your leak will
disappear:

my $r = Apache::Request-new( shift );

AFAICT, Apache::Request::new is NOT leaking here, since the 
REFCNT of its returned object IS 1.  There might be some
magic-related bug in perl that causes the assignment to bump 
$r's refcount to 2.  This MIGHT be circumventable with some better
code in Request.xs, but I really don't know how to fix it.

Until some perl guru enlightens us, as a personal rule I 
try hard to avoid expressions like

  $foo = make_something_out_of($foo);

I realize that this isn't always possible, but it often/usually
is.  Such advice would serve you well in this case; you could
even get away with this

  my $r = shift;
  my $apr = Apache::Request-new($r);

That's not going to leak, either.  At least I hope not :-)

HTH
-- 
Joe Schaefer



Re: nice mod_perl statistics to share

2002-07-08 Thread Ade Olonoh

 This is the netcraft.com:
 http://perl.apache.org/release/outstanding/stats/netcraft.html

In case you're interested, here are the stats w/ the hosts per IP
calculated starting at Jan 2001.  I was curious to see if the increase
in hosts had more to do with an increase of virtual hosts (on ISPs for
example) rather than unique people making the deliberate choice to
install and use mod_perl.  The good news seems that the avg. no. hosts
per IP have dropped from last year, and remained about the same for the
past year.  So it seems like more people are making the concious
decision, other caveats aside.


 Hosts IPs  Hosts Per IP
 - ---  
 3789712   437454   8.66
 3594884   410391   8.76
 3633952   411314   8.83
 3478130   393860   8.83
 3354370   388506   8.63
 2819847   341458   8.26
 2720503   326545   8.33
 2651419   322595   8.22
 2540267   293633   8.65
 2899420   281192  10.31
 2823060   283180   9.97
 2936558   281471  10.43
 2802093   273827  10.23
 2475367   265466   9.32
 2482288   256862   9.66
 2298821   244201   9.41
 2203353   230502   9.56
 2001011   225123   8.89
 1811864   214467   8.45
 1524620   197931   7.70
 1597399   183327   8.71
 1508381   170758   8.83
 1476602   152073   9.71
 1286714   132940   9.68
 1080206   123008   8.78
  852675   108327   7.87
  73680595994   7.68
  61242585749   7.14
  47861474515   6.42
  41874266239   6.32


--Ade.



Re: Perl sections

2002-07-08 Thread Mike Blazer



Randal L. Schwartz wrote:
 
  Mike == Mike Blazer [EMAIL PROTECTED] writes:
 
 Mike Yeah, thanks. But the whole that site has nothing to do without the
 Mike database :) It almost has no static content.
 Mike But seems like you are both right. Template would be really safer. While
 Mike this also breaks the nice concept of starting each server with apachectl
 Mike -D name and having all confugurables (perl vars, hashes) together in
 Mike the same file.
 
 Solution:
 
 generate
 
 httpd.conf.pages
 httpd.conf.proxy
 
 using Template Toolkit.  Easy'nuff.  Lots of common stuff, plus unique
 stuff.  You can use tpage and then there's not even any programming:
 
 httpd.conf.pages: httpd.conf.tmpl
 tpage --define server=pages  $  $@
 httpd.conf.proxy: httpd.conf.tmpl
 tpage --define server=proxy  $  $@
 
 then check [% IF server = 'pages'; ... ; END %] in your templates.
 
 Make httpd.conf be simply:
 
 ifdefine pages
 Include httpd.conf.pages
 /ifdefine
 ifdefine proxy
 Include httpd.conf.proxy
 /ifdefine
 ifdefine !pages
 ifdefine !proxy
 Include httpd.conf.other
 /ifdefine
 /ifdefine
 
 Done. :)

Well, thanks, this is much what I'm doing

IfDefine be-image
   PidFile logs/httpd_image.pid
   ScoreBoardFile logs/apache_runtime_status.image

   Perl
$Counter::INI::httpd_name = image;
   /Perl
/IfDefine
IfDefine be-pages
   PidFile logs/httpd_pages.pid
   ScoreBoardFile logs/apache_runtime_status.pages

   Perl
$Counter::INI::httpd_name = pages;
   /Perl
/IfDefine
Perl
   $Counter::INI::ssl = 0;
/Perl
IfDefine SSL
   Perl
   $Counter::INI::ssl = 1;
   /Perl
/IfDefine

etc.

but then the virtual hosts vary so much that it's no use to use a
template - they are very different. Plus, my conf work also on my home
Win32 machine, so all paths are also calculated in Perl section. Plus
2 httpd+mod_perl servers (light and heavy) use different subsets of
modules (loaded in different startup.pl files). So, it'd anyway take to
generate a large parts of conf-code and send to template. I'm just
sending it directly to Apache-httpd_conf :)

But as for the proxy (without mod_perl) - yes, I'm already typing a
template, unfortunatelly it seems like the only way...

Anyway, for some future, may be it worth to use some efforts to be able
to use Perl sections even for the servers that don't need mod_perl
processing - by loading and unloading mod_perl or by loading it into
some separate thread and killing it after the server startup. It'd be
great to have this feature to configure Apache.

Thanks, I'll look into the templating thing. I'm a little stuck in my
mind in Perl sections, because it was already done this way in my
previous 1-server conf. Probably it's better to generate static
conf-files with small Perl parts with PerlSetVar's only.

I'll look into that, thanks.
-- 
==
Mike Blazer
[EMAIL PROTECTED]
==



Re: nice mod_perl statistics to share

2002-07-08 Thread Stas Bekman

Ask Bjoern Hansen wrote:
 On Fri, 5 Jul 2002, Stas Bekman wrote:
 
 [...]
 
Also you must not forget that a huge amount of back-end mod_perl servers
are simply invisible to these scanners because they are running behind a
proxy. So I won't be surprised if the real number is at least about
twice larger.
 
 
 I don't understand why you think so.  If the '/' url is handled by a
 mod_perl enable server, then mod_perl will show up in the headers,
 proxy server or not.  Sure, there'll be some servers where you can't
 see that it's handled by mod_perl, but I doubt that it's all that
 many.
 
 $ lwp-request -e -d -S 'http://dev.perl.org/' | grep ^Server
 Server: Apache/1.3.26 (Unix) mod_perl/1.27

heh, that's true, shame on me :)

__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com




Re: [win32] new perl/apache/mod_perl binary

2002-07-08 Thread Ron Savage

On Mon, 8 Jul 2002 00:24:30 -0500 (CDT), Randy Kobes wrote:
Hi,
I've placed an updated perl-5.6.1/Apache-1.3.26/mod_perl-1.27
Win32 binary package, perl-win32-bin-0.8.exe (a self-extracting
archive), in ftp://theoryx5.uwinnipeg.ca/pub/other/. This

Randy

I cannot get this to start properly under WinNT.

I've tried installing in C:\ and D:\.

I've updated (but not uploaded) my configure-apache.pl to patch these
3 files:
D:\perl\lib\Config.pm
D:\perl\lib\CPAN\Config.pm
D:\apache\conf\httpd.conf
so the install on D:\ should be correct.

Symptoms:
1)
shellApache.exe -n Apache -k install
2 lines of output appear:

Installing the Apache service
The Apache service has been installed successfully.

and then a Windows error box, containing:
The instruction at 0x... referenced memory at 0x The memory
could not be 'read'.
Nevertheless, Apache is installed, and can be uninstalled.
2)
If I try
shellapache -k start
without the install, and try a -k stop in another DOS window, I get
the same error box (in the -k stop window) with _exactly_ the same 2
memory addresses.
Nevertheless, Apache stops.
3) If I try
shellapache -n Apache -k install
and ignore the error, and then try:
shellapache -n Apache -k start
I get 2 lines of output:

The Apache service is starting.
The Apache service has started.

with about 6 seconds between the msgs, then straight after the 2nd
msg, the error box with _exactly_ the same 2 memory addresses.
Nevertheless, Apache can be stopped, and it does serve pages.
4) access.log contains the expected.
error.log contains nothing.
ssl_engine_log contains this per start:
-8-
[07/Jul/2002 22:47:15 04016] [info]  Server: Apache/1.3.26,
Interface: mod_ssl/2.8.10, Library: OpenSSL/0.9.6d
[07/Jul/2002 22:47:15 04016] [warn]  You are using mod_ssl under
Win32. This combination is *NOT* officially supported. Use it at your
own risk!
[07/Jul/2002 22:47:15 04016] [info]  Init: 1st startup round (still
not detached)
[07/Jul/2002 22:47:15 04016] [info]  Init: Initializing OpenSSL
library
[07/Jul/2002 22:47:15 04016] [info]  Init: Loading certificate 
private key of SSL-aware server localhost:443
[07/Jul/2002 22:47:15 04016] [info]  Init: Seeding PRNG with 136
bytes of entropy
[07/Jul/2002 22:47:15 04016] [info]  Init: Generating temporary RSA
private keys (512/1024 bits)
[07/Jul/2002 22:47:16 04016] [info]  Init: Configuring temporary DH
parameters (512/1024 bits)
[07/Jul/2002 22:47:16 04016] [warn]  Failed to release global mutex
lock
[07/Jul/2002 22:47:16 04016] [warn]  Failed to release global mutex
lock
[07/Jul/2002 22:47:16 04016] [info]  Init: Seeding PRNG with 136
bytes of entropy
[07/Jul/2002 22:47:16 04016] [info]  Init: Configuring temporary RSA
private keys (512/1024 bits)
[07/Jul/2002 22:47:16 04016] [info]  Init: Configuring temporary DH
parameters (512/1024 bits)
[07/Jul/2002 22:47:16 04016] [info]  Init: Initializing (virtual)
servers for SSL
[07/Jul/2002 22:47:16 04016] [info]  Init: Configuring server
localhost:443 for SSL protocol
[07/Jul/2002 22:47:16 04016] [warn]  Init: (localhost:443) RSA server
certificate CommonName (CN) `www.snakeoil.dom' does NOT match server
name!?
[07/Jul/2002 22:47:18 04016] [info]  Init: 2nd startup round (already
detached)
[07/Jul/2002 22:47:18 04016] [info]  Init: Reinitializing OpenSSL
library
[07/Jul/2002 22:47:18 04016] [warn]  Failed to release global mutex
lock
[07/Jul/2002 22:47:18 04016] [warn]  Failed to release global mutex
lock
[07/Jul/2002 22:47:18 04016] [info]  Init: Seeding PRNG with 136
bytes of entropy
[07/Jul/2002 22:47:19 04016] [info]  Init: Configuring temporary RSA
private keys (512/1024 bits)
[07/Jul/2002 22:47:19 04016] [info]  Init: Configuring temporary DH
parameters (512/1024 bits)
[07/Jul/2002 22:47:19 04016] [info]  Init: Initializing (virtual)
servers for SSL
[07/Jul/2002 22:47:19 04016] [info]  Init: Configuring server
localhost:443 for SSL protocol
[07/Jul/2002 22:47:19 04016] [warn]  Init: (localhost:443) RSA server
certificate CommonName (CN) `www.snakeoil.dom' does NOT match server
name!?
-8-
--
Cheers
Ron Savage, [EMAIL PROTECTED] on 09/07/2002
http://savage.net.au/index.html