R
Robert Feldt
Hi,
I'm checking out WEBrick and it looks great.
I wonder if there is some easy way to do "virtual
hosting" so that I can host several domains on the
same machine.
So what I want is to have separate MountTables
for different domain names.
My idea is to simply write a subclass of HTTPServer
that adds a virtual_mount method that mounts servlets
on given paths and UriRegexp's. For the servlet to be invoked the uri must
match the UriRegexp and then
search_servlet is used like now.
Does this sound like a good idea or is there a better/simpler/existing
solution?
Regards,
I'm checking out WEBrick and it looks great.
I wonder if there is some easy way to do "virtual
hosting" so that I can host several domains on the
same machine.
So what I want is to have separate MountTables
for different domain names.
My idea is to simply write a subclass of HTTPServer
that adds a virtual_mount method that mounts servlets
on given paths and UriRegexp's. For the servlet to be invoked the uri must
match the UriRegexp and then
search_servlet is used like now.
Does this sound like a good idea or is there a better/simpler/existing
solution?
Regards,