You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Sander Temme <sc...@apache.org> on 2006/04/25 01:23:07 UTC

Custom Listen statement in perl-framework (Was: Re: [VOTE] 2.2.2 Candidate)

On Apr 23, 2006, at 9:37 AM, Paul Querna wrote:

> Sander Temme wrote:
>> FreeBSD bagheera.sandla.org. 6.1-RC FreeBSD 6.1-RC #3: Fri Apr 21  
>> 08:35:33 PDT 2006     sctemme@bagheera.sandla.org.:/usr/obj/usr/ 
>> src/sys/GENERIC  i386
>> Testsuite currently unusable, hangs on:
>> t/protocol/nntp-like........ok 1/10
>> This seems to be a local issue. Anyone else seeing this happen on  
>> FreeBSD? No crashes on minotaur which is also FreeBSD. I will  
>> advise when the 72 hour window is up.
>
> AFAIK, This test fails on all FreeBSD machines.
>
> Adding the following to the config file for this test should fix it:
> AcceptFilter nntp none
> Listen 119 nntp
> (Or whatever port it is running on)

Actually, the port is determined on the fly by the testsuite, all the  
configuration language available in the mod_nntp_like.c file is the  
following:

#if CONFIG_FOR_HTTPD_TEST

<VirtualHost mod_nntp_like>
     NNTPLike On
</VirtualHost>

<IfModule @ssl_module@>
     <VirtualHost mod_nntp_like_ssl>
         NNTPLike On
         SSLEngine On
     </VirtualHost>
</IfModule>

#endif

The slightly perverted VirtualHost statement seems to be converted by  
the testsuite into a combination of:

Listen 0.0.0.0:8530
<VirtualHost _default_:8530>
     ServerName localhost.localdomain:8530
     NNTPLike On
</VirtualHost>

So my question, especially to the perl-framework gurus, is how do I  
add a custom configuration option to that Listen statement?

Thanks,

S.

-- 
sctemme@apache.org            http://www.temme.net/sander/
PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF



Re: Custom Listen statement in perl-framework (Was: Re: [VOTE] 2.2.2 Candidate)

Posted by Sander Temme <sc...@apache.org>.
On Apr 24, 2006, at 4:39 PM, Geoffrey Young wrote:

> so, you want something like this eventually
>
>   Listen 0.0.0.0:8530 nntp
>   AcceptFilter nntp none
>   <VirtualHost _default_:8530>

I think it may be time to re-think the logic of this configuration  
snippet in the perl-framework, since the directives contained in it  
are in the process of growing some additional options that may be  
varied across tests. For instance, the AcceptFilter directive and the  
protocol argument to Listen, but also the ServerName with the  
UseCanonicalName and UseCanonicalPhysicalPort.

Perhaps we're looking for a more generic way to specify a virtual  
host, like, in the module source file or conf.in,

<VirtualHost some_name [servername] [protocol]>
     ...stuff...
</VirtualHost>

Which would translate to:

Listen 0.0.0.0:aPort [protocol]

<VirtualHost _default_:aPort>
     ServerName [servername]? [servername]:aPort : aServername:aPort
     ...stuff...
</VirtualHost>

Where some_name would play the same role as today, and the new  
parameters optional for backwards compatibility.

Something like that? Perhaps more optional tuning knobs?

S.

-- 
sctemme@apache.org            http://www.temme.net/sander/
PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF



Re: Custom Listen statement in perl-framework (Was: Re: [VOTE] 2.2.2 Candidate)

Posted by Geoffrey Young <ge...@modperlcookbook.org>.
resending to all the interested lists...

Sander Temme wrote:
> 
> On Apr 23, 2006, at 9:37 AM, Paul Querna wrote:
> 
>> Sander Temme wrote:
>>
>>> FreeBSD bagheera.sandla.org. 6.1-RC FreeBSD 6.1-RC #3: Fri Apr 21 
>>> 08:35:33 PDT 2006     sctemme@bagheera.sandla.org.:/usr/obj/usr/
>>> src/sys/GENERIC  i386
>>> Testsuite currently unusable, hangs on:
>>> t/protocol/nntp-like........ok 1/10
>>> This seems to be a local issue. Anyone else seeing this happen on 
>>> FreeBSD? No crashes on minotaur which is also FreeBSD. I will  advise
>>> when the 72 hour window is up.
>>
>>
>> AFAIK, This test fails on all FreeBSD machines.
>>
>> Adding the following to the config file for this test should fix it:
>> AcceptFilter nntp none
>> Listen 119 nntp
>> (Or whatever port it is running on)
> 
> 
> Actually, the port is determined on the fly by the testsuite, all the 
> configuration language available in the mod_nntp_like.c file is the 
> following:
> 
> #if CONFIG_FOR_HTTPD_TEST
> 
> <VirtualHost mod_nntp_like>
>     NNTPLike On
> </VirtualHost>
> 
> <IfModule @ssl_module@>
>     <VirtualHost mod_nntp_like_ssl>
>         NNTPLike On
>         SSLEngine On
>     </VirtualHost>
> </IfModule>
> 
> #endif
> 
> The slightly perverted VirtualHost statement seems to be converted by 
> the testsuite into a combination of:
> 
> Listen 0.0.0.0:8530
> <VirtualHost _default_:8530>
>     ServerName localhost.localdomain:8530
>     NNTPLike On
> </VirtualHost>

that's all accurate.

> 
> So my question, especially to the perl-framework gurus, is how do I  add
> a custom configuration option to that Listen statement?

so, you want something like this eventually

  Listen 0.0.0.0:8530 nntp
  AcceptFilter nntp none
  <VirtualHost _default_:8530>
  ...

?

I don't think you can currently do that with the framework.  I might be able
to work up something like

  Listen mod_nntp_like nntp

so that the "mod_nntp_like" would expand out to match the way we do the
vhost sections (though it's adding yet more black magic).  it might take me
a while to get around to it, but I could probably work on it "soonish"

is there no other way to handle this config wise?

--Geoff


Re: Custom Listen statement in perl-framework (Was: Re: [VOTE] 2.2.2 Candidate)

Posted by Geoffrey Young <ge...@modperlcookbook.org>.

Sander Temme wrote:
> 
> On Apr 23, 2006, at 9:37 AM, Paul Querna wrote:
> 
>> Sander Temme wrote:
>>
>>> FreeBSD bagheera.sandla.org. 6.1-RC FreeBSD 6.1-RC #3: Fri Apr 21 
>>> 08:35:33 PDT 2006     sctemme@bagheera.sandla.org.:/usr/obj/usr/
>>> src/sys/GENERIC  i386
>>> Testsuite currently unusable, hangs on:
>>> t/protocol/nntp-like........ok 1/10
>>> This seems to be a local issue. Anyone else seeing this happen on 
>>> FreeBSD? No crashes on minotaur which is also FreeBSD. I will  advise
>>> when the 72 hour window is up.
>>
>>
>> AFAIK, This test fails on all FreeBSD machines.
>>
>> Adding the following to the config file for this test should fix it:
>> AcceptFilter nntp none
>> Listen 119 nntp
>> (Or whatever port it is running on)
> 
> 
> Actually, the port is determined on the fly by the testsuite, all the 
> configuration language available in the mod_nntp_like.c file is the 
> following:
> 
> #if CONFIG_FOR_HTTPD_TEST
> 
> <VirtualHost mod_nntp_like>
>     NNTPLike On
> </VirtualHost>
> 
> <IfModule @ssl_module@>
>     <VirtualHost mod_nntp_like_ssl>
>         NNTPLike On
>         SSLEngine On
>     </VirtualHost>
> </IfModule>
> 
> #endif
> 
> The slightly perverted VirtualHost statement seems to be converted by 
> the testsuite into a combination of:
> 
> Listen 0.0.0.0:8530
> <VirtualHost _default_:8530>
>     ServerName localhost.localdomain:8530
>     NNTPLike On
> </VirtualHost>

that's all accurate.

> 
> So my question, especially to the perl-framework gurus, is how do I  add
> a custom configuration option to that Listen statement?

so, you want something like this eventually

  Listen 0.0.0.0:8530 nntp
  AcceptFilter nntp none
  <VirtualHost _default_:8530>
  ...

?

I don't think you can currently do that with the framework.  I might be able
to work up something like

  Listen mod_nntp_like nntp

so that the "mod_nntp_like" would expand out to match the way we do the
vhost sections (though it's adding yet more black magic).  it might take me
a while to get around to it, but I could probably work on it "soonish"

is there no other way to handle this config wise?

--Geoff

Re: Custom Listen statement in perl-framework (Was: Re: [VOTE] 2.2.2 Candidate)

Posted by Geoffrey Young <ge...@modperlcookbook.org>.
resending to all the interested lists...

Sander Temme wrote:
> 
> On Apr 23, 2006, at 9:37 AM, Paul Querna wrote:
> 
>> Sander Temme wrote:
>>
>>> FreeBSD bagheera.sandla.org. 6.1-RC FreeBSD 6.1-RC #3: Fri Apr 21 
>>> 08:35:33 PDT 2006     sctemme@bagheera.sandla.org.:/usr/obj/usr/
>>> src/sys/GENERIC  i386
>>> Testsuite currently unusable, hangs on:
>>> t/protocol/nntp-like........ok 1/10
>>> This seems to be a local issue. Anyone else seeing this happen on 
>>> FreeBSD? No crashes on minotaur which is also FreeBSD. I will  advise
>>> when the 72 hour window is up.
>>
>>
>> AFAIK, This test fails on all FreeBSD machines.
>>
>> Adding the following to the config file for this test should fix it:
>> AcceptFilter nntp none
>> Listen 119 nntp
>> (Or whatever port it is running on)
> 
> 
> Actually, the port is determined on the fly by the testsuite, all the 
> configuration language available in the mod_nntp_like.c file is the 
> following:
> 
> #if CONFIG_FOR_HTTPD_TEST
> 
> <VirtualHost mod_nntp_like>
>     NNTPLike On
> </VirtualHost>
> 
> <IfModule @ssl_module@>
>     <VirtualHost mod_nntp_like_ssl>
>         NNTPLike On
>         SSLEngine On
>     </VirtualHost>
> </IfModule>
> 
> #endif
> 
> The slightly perverted VirtualHost statement seems to be converted by 
> the testsuite into a combination of:
> 
> Listen 0.0.0.0:8530
> <VirtualHost _default_:8530>
>     ServerName localhost.localdomain:8530
>     NNTPLike On
> </VirtualHost>

that's all accurate.

> 
> So my question, especially to the perl-framework gurus, is how do I  add
> a custom configuration option to that Listen statement?

so, you want something like this eventually

  Listen 0.0.0.0:8530 nntp
  AcceptFilter nntp none
  <VirtualHost _default_:8530>
  ...

?

I don't think you can currently do that with the framework.  I might be able
to work up something like

  Listen mod_nntp_like nntp

so that the "mod_nntp_like" would expand out to match the way we do the
vhost sections (though it's adding yet more black magic).  it might take me
a while to get around to it, but I could probably work on it "soonish"

is there no other way to handle this config wise?

--Geoff