httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From DavidABr...@netscape.net
Subject Re: Protcol modules and virtual hosting
Date Tue, 20 Jun 2000 20:58:27 GMT
I don't see how this is any different than any other module. The module
config has a flag called bEnabled in the case of mod_echo, and if it is
1 it runs, if 0 it returns DECLINED. The module config structure controls 
this, no differently than any other module. Has anybody gotten port based
virtual hosting working for other modules?

The weird thing is when you trace the program, create_echo_server_config 
gets called twice, creating the configuration with the module turned off
twice, then echo_on gets called once, turning it on for the second config,
which is just what you would expect. Then, it gets strange. Two MORE config
are created, and echo_on is called on the fourth (so we have 4 config 
structures, the second and fourth set to bEnable, the other two not). If
you trace incoming connections, they all get passed the third structure 
created, which has echo off. This doesn't really look like a protocol 
module specific problem -- either a bug or I am just using a bad config
file.

BTW, the protocol module I am making is basically done and the structure 
provided makes them pretty easy to write -- good job! I had a bit of a
learning curve and few trial and error things, but other than the fact that
many of the useful API calls wanted a request object (which seems a rather
HTTP specific structure) requiring me to rip out their internals and 
duplicate them in my module, it worked well. If the UDP support mentioned 
for WAP gets in there, and some new API calls for useful calls that don't
need request_objects, new protocols should start multiplying :)

    Thanks for any help!

    David Bryan

new-httpd@apache.org wrote:
>
> 
> I do not believe that Apache 2.0 currently allows different protocol
> modules on different virtual hosts.  Nobody has really tried this, so it
> hasn't been implemented.  :-)
> 
> Ryan
> 
> On Tue, 20 Jun 2000 DavidABryan@netscape.net wrote:
> 
> > As mentioned in a previous email, I have written a module to speak a different protocol
than HTTP based on the Apache 2.0 echo module. Following a suggestion from the list, I am
trying to listen on a different port for my protocol than HTTP, and want to do this with port-based
virtual hosting. Like the echo module, I didn't define a merge_server_config(), which from
what I read should cause the VirtualHost arguments to win out. I couldn't get it to work properly
(it ignored my turning the module "on" if it was in the virtualserver block), so I went back
to the stock 2.0a4 code and the echo module and hit the same problem. I saw a few bug reports
about VirtualHost problems, but none seem quite the same -- I'm not sure if I am doing something
wrong in my config file (quite possible) or if this is a real problem. The server config I
tried is:
> > 
> > User webuser
> > Group webgroup
> > Listen 127.0.0.1:5100
> > Listen 127.0.0.1:80
> > LockFile /var/run/apache-lock 
> > ScriptAlias /cgi-bin /usr/scratch/apache/www/cgi-bin
> > DocumentRoot /usr/scratch/apache/www/htdocs/
> > 
> > 
> > <VirtualHost 127.0.0.1:5100>
> > ErrorLog /usr/scratch/apache/www/logs/error_log2
> > TransferLog /usr/scratch/apache/www/logs/trans_log2
> > ProtocolEcho yes
> > </VirtualHost>
> > 
> > If I move the line "ProtocolEcho yes" out of the VirtualHost block then both ports
have echo, in the block, neither does.
> > 
> > Thanks!
> > 
> > David Bryan
> > 
> > ----------
> > Get your own FREE, personal Netscape Webmail account today at http://home.netscape.com/webmail/
> > 
> 
> 
> _______________________________________________________________________________
> Ryan Bloom                          rbb@apache.org
> 406 29th St.
> San Francisco, CA 94131
> -------------------------------------------------------------------------------
> 
> 

----------
Get your own FREE, personal Netscape Webmail account today at http://home.netscape.com/webmail/

Mime
View raw message