|
Hi Michael,
I am using the older version of swazoo, so depending on what version of
swazoo you are using, I may be leading you down the wrong track.
I think you have identified the problem with the different ips. I am
guessing your example would work if you used SitePortIdentifier instead
of SiteIdentifier as an alias.
Dolphin's sockets bind to INADDR_ANY, which means that the local ip
address of the connection socket (which is set into the request's ip
instance variable) could be any of your machine's ip addresses. If you
do want to serve only from a single specific local ip, the only way
that I know how to do this is to hack into ServerSocket(2) and change
the #bind method. In my opinion, at least in the older version of
swazoo, the whole issue of defining sites is harder than it should be
due to the lack of being able to bind a server socket to a specific ip,
and the lack of a SiteIdentifier that matches against port and host
header.
However there are work arounds ... if you are happy to serve the same
content from any IP on your machine (and don't mind ignoring the host
header), the simple solution is to use SitePortIdentifier which ignores
the local ip address.
Hope this helps,
Steve
--
Steve Waring
|