Multiplexing on Host: header?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Multiplexing on Host: header?

Gerardo Richarte
Hi!

    I'm interested in serving several Seaside applications from a single
Smalltalk, each of them with its own domain name and virtual host. I'd
like each of them to be installed in the root of its own domain (so as
http://www.app1.com/ directly goes to one app, and http://www.app2.com
goes to another)

My question is:

    Is there a way to multiplex what application Seaside answers using
the Host: header option, instead of the path? I mean, I know how to make

http://www.app.com/app1 serve application 1 and
http://www.app.com/app2 serve application 2,
but I like better

http://www.app1.com/ and http://www.app2.com/

    thanks!!!
    richie

PS: This is using fastcgi as in GLASS, and I'd really prefer to not have
some rewrite or redirect rules, I want the URLs to be as clean as
possible and unrelated as much as possible
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Multiplexing on Host: header?

Philippe Marschall
2009/9/19, Gerardo Richarte <[hidden email]>:

> Hi!
>
>     I'm interested in serving several Seaside applications from a single
> Smalltalk, each of them with its own domain name and virtual host. I'd
> like each of them to be installed in the root of its own domain (so as
> http://www.app1.com/ directly goes to one app, and http://www.app2.com
> goes to another)
>
> My question is:
>
>     Is there a way to multiplex what application Seaside answers using
> the Host: header option, instead of the path? I mean, I know how to make
>
> http://www.app.com/app1 serve application 1 and
> http://www.app.com/app2 serve application 2,
> but I like better
>
> http://www.app1.com/ and http://www.app2.com/
>
>     thanks!!!
>     richie
>
> PS: This is using fastcgi as in GLASS, and I'd really prefer to not have
> some rewrite or redirect rules, I want the URLs to be as clean as
> possible and unrelated as much as possible

This isn't supported out of the box but here's a sketch how you can
implement it:
- make a new kind of WADispatcher (not sure whether a subclass makes
sense) that dispatches based on the host name, make this the default
dispatcher
- add a dispatcher for each virtual host to this dispatcher

Cheers
Philippe
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside