You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Greg Matheson <la...@ms.chinmin.edu.tw> on 2004/10/03 02:34:39 UTC

How can I tell whether mod_perl is running?

In the 1.0 documentation there is a section on ways to confirm
the version of mod_perl being run: checking the error_log,
viewing /perl-status, telnetting in and getting the environmental
variables with a script.

However, I can't find any corresponding section in the 2.0 documentation.

So, the fact I'm running mod_perl-1.99_16 with httpd-2.0.50, and I don't see
that information when I do the above, just the httpd version,
didn't worry me enough to force me to ask.

Here are some of the environmental variables retrieved
by a perl-script handler:

SERVER_SIGNATURE = <address>Apache/2.0.50 (Unix) Server at momotaro.chinmin.edu
MOD_PERL = mod_perl/1.99_16
GATEWAY_INTERFACE = CGI/1.1

The 1.0 documentation suggests that should be perl
    GATEWAY_INTERFACE       CGI-Perl/1.1

but I ignored that because I have got basic handlers working and
CGI-Kwiki under mod_perl works fine. (The later Kwiki-0.33 does not).


Anyway, I am now being forced to wonder again if my httpd configuration is
not good after trying out Test-Apache in my build
directory. The signature there is:

[Sun Oct 03 08:25:54 2004] [notice] Apache/2.0.50 (Unix)
mod_perl/1.99_16 Perl/v5.8.3 world domination series/2.0
configured -- resuming normal operations

This is different than the public signature of httpd installed
in /usr/local/httpd. Is this signature with the mod_perl
information only for private testing?

Or did I get the perl.conf and httpd.conf wrong, or something
else?

-- 
Greg Matheson, Taiwan

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: How can I tell whether mod_perl is running?

Posted by Stas Bekman <st...@stason.org>.
Stas Bekman wrote:
> Greg Matheson wrote:
> 
>> On Sat, 02 Oct 2004, Stas Bekman wrote:
>>
>>
>>>> This is different than the public signature of httpd installed
>>>> in /usr/local/httpd. Is this signature with the mod_perl
>>>> information only for private testing?
>>
>>
>>
>>> Right, this is due to to test of the $s->add_version_component() method:
>>
>>
>>
>> My problem was not getting any mod-perl info at all, just the
>> httpd one, and was due to having the ServerTokens directive set.
>> I found out about this thru the docu on the above method.
>> I copied that info into a patch to
>> http://perl.apache.org/docs/1.0/guide/install.html
>> which I also sent to the docs-dev list. 
> 
> 
> I can't see anything posted there. I suppose the moderators aren't 
> around to approve posts :( Just post it here in the future, or subscribe 
> to that list before posting to it.
> 
>> The value of this patch
>> depends, however on whether ServerTokens directive is also in
>> httpd 1! I don't know if it is or not.

Thanks Greg, now committed.


-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: How can I tell whether mod_perl is running?

Posted by Stas Bekman <st...@stason.org>.
Greg Matheson wrote:
> On Sat, 02 Oct 2004, Stas Bekman wrote:
> 
> 
>>>This is different than the public signature of httpd installed
>>>in /usr/local/httpd. Is this signature with the mod_perl
>>>information only for private testing?
> 
> 
>>Right, this is due to to test of the $s->add_version_component() method:
> 
> 
> My problem was not getting any mod-perl info at all, just the
> httpd one, and was due to having the ServerTokens directive set. 
> 
> I found out about this thru the docu on the above method.
> I copied that info into a patch to
> http://perl.apache.org/docs/1.0/guide/install.html
> which I also sent to the docs-dev list. 

I can't see anything posted there. I suppose the moderators aren't around 
to approve posts :( Just post it here in the future, or subscribe to that 
list before posting to it.

> The value of this patch
> depends, however on whether ServerTokens directive is also in
> httpd 1! I don't know if it is or not.
> 
> --- install.html.orig	2004-10-03 13:25:13.000000000 +0800
> +++ install.html	2004-10-03 13:30:32.000000000 +0800

Please take a look at:
http://perl.apache.org/contribute/index.html
to learn how to submit doc patches. HTML is not the source document, so 
your patch can't be applied. And make sure that you include the whole path 
and not just the final file, there is more than one install.pod in the tree.

Thanks Greg.


-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: How can I tell whether mod_perl is running?

Posted by Greg Matheson <la...@ms.chinmin.edu.tw>.
On Sat, 02 Oct 2004, Stas Bekman wrote:

> >This is different than the public signature of httpd installed
> >in /usr/local/httpd. Is this signature with the mod_perl
> >information only for private testing?

> Right, this is due to to test of the $s->add_version_component() method:

My problem was not getting any mod-perl info at all, just the
httpd one, and was due to having the ServerTokens directive set. 

I found out about this thru the docu on the above method.
I copied that info into a patch to
http://perl.apache.org/docs/1.0/guide/install.html
which I also sent to the docs-dev list. The value of this patch
depends, however on whether ServerTokens directive is also in
httpd 1! I don't know if it is or not.

--- install.html.orig	2004-10-03 13:25:13.000000000 +0800
+++ install.html	2004-10-03 13:30:32.000000000 +0800
@@ -3712,6 +3712,7 @@
 <p>Specify the port number if your server is listening to a port other
 than port 80. For example: <code><a href="http://www.example.com:8080">http://www.example.com:8080</a></code>.</p>
 <br><br>
+<p>Also  remember  for these approaches that the ServerTokens directive value controls whether the component information is displayed or not.</p>
 <a href="#top" class="noPrint"><img src="../../../images/nav/page_top.gif" width="48" height="16" border="0" alt="TOP"></a>    
     <br><br>
     <!-- SwishCommand noindex -->
@@ -4071,4 +4072,4 @@
         </div>
 
 </body>
-</html>
\ No newline at end of file
+</html>

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: How can I tell whether mod_perl is running?

Posted by Stas Bekman <st...@stason.org>.
Greg Matheson wrote:
> In the 1.0 documentation there is a section on ways to confirm
> the version of mod_perl being run: checking the error_log,
> viewing /perl-status, telnetting in and getting the environmental
> variables with a script.
> 
> However, I can't find any corresponding section in the 2.0 documentation.

most of the 1.0 docs need to be ported to 2.0. In this particular case 
it's exactly the same as mp1.0. You are more than welcome to send patches 
to accomplish that porting, Greg. Please read:
http://perl.apache.org/contribute/index.html

> Anyway, I am now being forced to wonder again if my httpd configuration is
> not good after trying out Test-Apache in my build
> directory. The signature there is:
> 
> [Sun Oct 03 08:25:54 2004] [notice] Apache/2.0.50 (Unix)
> mod_perl/1.99_16 Perl/v5.8.3 world domination series/2.0
> configured -- resuming normal operations
> 
> This is different than the public signature of httpd installed
> in /usr/local/httpd. Is this signature with the mod_perl
> information only for private testing?

Right, this is due to to test of the $s->add_version_component() method:

modperl-2.0/t/conf/modperl_extra.pl: 
$s->add_version_component("world domination series/2.0");

In other words you can add more things into the server signature, should 
you want to.

-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html