fitnah55
fitnah55 at hotmail.com
Thu Jul 17 13:14:53 EST 2003
doesn't really help if the box only has one IP.. IPv6 isn't a reality yet, and IPs are extremely expensive i don't think there's any viable solution without changing the telnet protocol *erk* > I think this is unnecessary. Something like this in the > config will make > your handler listen on 1.1.1.1:8888 only: > > Listen 2.2.2.2:80 > Listen 1.1.1.1:8888 > > <VirtualHost 1.1.1.1:8888> > > PythonConnectionHandler blah > ... > > </VirtualHost> > > > On Thu, 17 Jul 2003, Robert Sanderson wrote: > > > > > You can check the address it was received on and decline to handle > > anything received on the wrong port. Then it'll fall through to the > > normal handlers. > > > > For example: > > > > def connectionhandler(conn): > > if (conn.local_addr[0] != SERVER_IP or conn.local_addr[1] > != SERVER_PORT): > > return apache.DECLINED > > elif (conn.base_server.server_hostname != SERVER_NAME): > > return apache.DECLINED > > else: > > # XXX do everything here > > > > return apache.OK > > > > > > Also look at conn.base_server for the server object's other bits and > > pieces. > > > > http://www.modpython.org/live/current/doc-html/pyapi-mpconn-mem.html > > http://www.modpython.org/live/current/doc-html/pyapi-mpsrv-mem.html > > > > Rob > > > > > > On Thu, 17 Jul 2003, fitnah55 wrote: > > > > > > > > path problem.. couldn't specify that the connection > handler was in a > > > specific > > > place, so i added a blah.pth file to site-packages > pointing to the lib > > > directory of the host.. > > > > > > i can actually run the virtual host without specifying a > documentroot so > > > i > > > guess that works out fine > > > > > > but i'm not so sure canonical name type name based > virtual hosts will > > > work > > > with this as is though? > > > > > > i think right now using the virtual host directive is > essentially just > > > giving > > > it its own error log > > > > > > i can actually start developing a rudimentary design now though so > > > that's > > > pretty cool... it took a lot less effort than i thought > when i first > > > started > > > looking into it > > > > > >
|