httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sascha Kersken">
Subject Re: How to get a module to bind on a different port
Date Fri, 10 Nov 2006 20:57:48 GMT

the Listen directive is always part of the Server configuration and not a 
module's business.
The correct way is to use more than one Listen directive and have a virtual 
host deal with your module stuff.
For example:
Listen 80
<VirtualHost *:YOURPORT>
Look at the documentation on modules like mod_ssl for details (or e.g. my 
own module mod_daytime:

Hope that helps.


----- Original Message ----- 
From: "Kasper Laudrup" <>
To: <>
Sent: Saturday, November 11, 2006 9:45 PM
Subject: How to get a module to bind on a different port

> I'm trying to write a module that listens on another port than port 80,
> but I have a hard time figuring out how to do that, let alone if it's
> possible at all. I can change the Listen configuration in Apaches config
> file, and apache seems to handle request on that port as it would
> request on any other port, but I'm just wondering if there's a simple
> way or more "correct" way of doing that apart from getting the port
> number from the request handle in every connection.
> Hope someone has any ideas,
> Thanks a lot,
> Kasper Laudrup
> -- 
> This email has not been scanned for virus. Read at your own risk!

View raw message