same handler with different port

same handler with different port

am 17.02.2009 16:20:42 von valerio crini

Hi, I was wondering if is possible using same mod_perl handler with
different ports and how can i manage to configure it.

I was thinking of a similar thing:



SetHandler perl-script
Listen 12200
PerlResponseHandler Handler



SetHandler perl-script
PerlResponseHandler Handler2
Listen 12300


so if i call http://../query:12200 i call Handler
and if i call http://../query:12300 i call Handler2

Re: same handler with different port

am 17.02.2009 16:30:30 von Ryan Gies

On Tue, 17 Feb 2009 16:20:42 +0100
valerio wrote:

> Hi, I was wondering if is possible using same mod_perl handler with
> different ports and how can i manage to configure it.

The Listen directive is part of the server configuration, and not valid
within a Location block. Configure your server to listen on both ports
12200 and 12300, then specify two VirtualHosts, one for each port. You
may then specify SetHandler and PerlResponseHandler within each
VirtualHost.

For Apache2, start reading here:
http://httpd.apache.org/docs/2.0/bind.html
http://httpd.apache.org/docs/2.0/mod/mpm_common.html#listen

>
> I was thinking of a similar thing:
>
>
>
> SetHandler perl-script
> Listen 12200
> PerlResponseHandler Handler
>

>
>
> SetHandler perl-script
> PerlResponseHandler Handler2
> Listen 12300
>

>
> so if i call http://../query:12200 i call Handler
> and if i call http://../query:12300 i call Handler2

Re: same handler with different port

am 17.02.2009 17:35:31 von Michael Ludwig

valerio crini schrieb:
> Hi, I was wondering if is possible using same mod_perl handler
> with different ports and how can i manage to configure it.

> so if i call http://../query:12200 i call Handler
> and if i call http://../query:12300 i call Handler2

This, of course, would not be read as a port number.
The port number follows the hostname.

http://localhost:8080/query

Michael Ludwig

Re: same handler with different port

am 18.02.2009 10:51:09 von Michael Ludwig

valerio crini schrieb:
> Sorry, i 'had typo errors. I managed in this way:
>
>
>
> SetHandler perl-script
> PerlResponseHandler Dada::Rufus::Handler
>

>
>

Another typo here.

>
>
> PerlSetVar Login true
> SetHandler perl-script
> PerlResponseHandler Dada::Rufus::Handler
>

>

Same typo once more.

> So i can pass different params only by changing port number: according
> to you is it the right way?

Yes. In addition to this, you only need the following:

Listen 12200
Listen 12300
PerlModule Dada::Rufus::Handler

But you knew that.

Michael Ludwig

Re: same handler with different port

am 18.02.2009 11:30:01 von Michael Ludwig

valerio crini schrieb:

>>>
>>> [...]
>>>
>>
>> Another typo here.
>>
>>>
>>> [...]
>>>
>>
>> Same typo once more.
> I can't manage finding where are typos, I'm very sorry.

Now you can.

By the way, beware the list does not set the Reply-To header to the
list, so if you just hit "Reply", as I do, the reply by default goes
to the individual who has posted the message, not to the list, as it
is probably intended to do.

Michael Ludwig