Deploying Seaside on a Swazoo Server

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

Deploying Seaside on a Swazoo Server

Pat McDonald
Hi,

I have a question regarding deployment of a Seaside site on a Swazoo server. Development works fine using localhost:8080/mysite, but when I want to deploy I want to use my.domain.com as url. 

Any hints on what I must do to make this work.


Greetings,
Pat

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Deploying Seaside on a Swazoo Server

Nick
Hi Pat,

Do you mean you want to remove /mysite ? Does the seaside book help? http://book.seaside.st/book/advanced/deployment/deployment-preparing

On 2 June 2011 22:58, Pat McDonald <[hidden email]> wrote:
Hi,

I have a question regarding deployment of a Seaside site on a Swazoo server. Development works fine using localhost:8080/mysite, but when I want to deploy I want to use my.domain.com as url. 

Any hints on what I must do to make this work.


Greetings,
Pat

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



_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Deploying Seaside on a Swazoo Server

Philippe Marschall
In reply to this post by Pat McDonald
2011/6/2 Pat McDonald <[hidden email]>:
> Hi,
>
> I have a question regarding deployment of a Seaside site on a Swazoo server.
> Development works fine using localhost:8080/mysite, but when I want to
> deploy I want to use my.domain.com as url.
>
> Any hints on what I must do to make this work.

Well the computer needs to have this network name. What version of
Seaside, Swazoo and Smalltalk do you use? Do you use an Apache front
end?

Cheeers
Philippe
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Deploying Seaside on a Swazoo Server

Pat McDonald
In reply to this post by Pat McDonald
Hi Nick,

Right, I don't want people to have to type the extra /mysite. The book doesn't really help as I'm only using Swazoo as server and I don't have an Apache at the moment. Maybe I will in the future.

Pat.

On  3 June 2011 4:16, Nick Ager wrote:
Hi Pat,
 
Do you mean you want to remove /mysite ? Does the seaside book help? http://book.seaside.st/book/advanced/deployment/deployment-preparing

On 2 June 2011 22:58, Pat McDonald <[hidden email]> wrote:
Hi,

I have a question regarding deployment of a Seaside site on a Swazoo server. Development works fine using localhost:8080/mysite, but when I want to deploy I want to use my.domain.com as url. 

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Deploying Seaside on a Swazoo Server

Philippe Marschall
2011/6/3 Pat McDonald <[hidden email]>:
> Hi Nick,
>
> Right, I don't want people to have to type the extra /mysite. The book
> doesn't really help as I'm only using Swazoo as server and I don't have an
> Apache at the moment. Maybe I will in the future.

Which part is the one you're having trouble with, removing /mysite or
using my.domain.com as a server name instead of localhost?

Cheers
Philippe
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Deploying Seaside on a Swazoo Server

Pat McDonald
In reply to this post by Pat McDonald
It's removing the /mysite extra. I can access it if I use my.domain.com/mysite.

Thanks,

Pat

 

----- Original Message -----

From: Philippe Marschall

Sent: 06/03/11 10:06 AM

To: Seaside - general discussion

Subject: Re: [Seaside] Deploying Seaside on a Swazoo Server


 
2011/6/3 Pat McDonald <[hidden email]>: 
> Hi Nick, 
> 
> Right, I don't want people to have to type the extra /mysite. The book 
> doesn't really help as I'm only using Swazoo as server and I don't have an 
> Apache at the moment. Maybe I will in the future. 

Which part is the one you're having trouble with, removing /mysite or 
using my.domain.com as a server name instead of localhost? 

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

 


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Deploying Seaside on a Swazoo Server

Nick
In reply to this post by Pat McDonald
Hi Pat,
 
Right, I don't want people to have to type the extra /mysite. The book doesn't really help as I'm only using Swazoo as server and I don't have an Apache at the moment. Maybe I will in the future.

at the bottom of the link I posted (http://book.seaside.st/book/advanced/deployment/deployment-preparing) is a solution to removing extra /mysite (even using the Swazoo):

preferenceAt: #serverPath put: '/ 


HTH

Nick


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Deploying Seaside on a Swazoo Server

Julian Fitzell-2
Hi Nick,

I just skimmed your blog post. Note that under "Alternative 2" at the
bottom, rather than changing the default dispatcher, you could also
just change the dispatcher associated with (possibly only one of) your
server adaptor(s):

aServerAdaptor requestHandler: myApplication

When #requestHandler is nil (the default state) it uses the default dispatcher.

Julian

On Fri, Jun 3, 2011 at 9:58 AM, Nick Ager <[hidden email]> wrote:

> Hi Pat,
>
>>
>> Right, I don't want people to have to type the extra /mysite. The book
>> doesn't really help as I'm only using Swazoo as server and I don't have an
>> Apache at the moment. Maybe I will in the future.
>
> at the bottom of the link I posted
> (http://book.seaside.st/book/advanced/deployment/deployment-preparing) is a
> solution to removing extra /mysite (even using the Swazoo):
> preferenceAt: #serverPath put: '/
> I've also written about it on my
> blog: http://nickager.com/blog/serving-seaside-requests-without-the-application-name-in-the-URL/
> HTH
> Nick
>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Deploying Seaside on a Swazoo Server

Pat McDonald
In reply to this post by Pat McDonald
Hi Nick,

Sorry but I don't get it :(. 

Let me explain a bit more. I have 2 small "private use" sites. I want to access them with their own domainname and that doesn't work.

I can access them with my.domain1.com/domain1 and my.domain1.com/domain2 or my.domain2.com/domain1 and my.domain2.com/domain2, but using my.domain1.com or my.domain2.com just gets me the Welcome screen. I guess I must change the default of WADispatcher, but do I need to do this for both sites ? 

Pat

 

----- Original Message -----

From: Nick Ager

Sent: 06/03/11 10:58 AM

To: Seaside - general discussion

Subject: Re: [Seaside] Deploying Seaside on a Swazoo Server


Hi Pat,
 
Right, I don't want people to have to type the extra /mysite. The book doesn't really help as I'm only using Swazoo as server and I don't have an Apache at the moment. Maybe I will in the future.
 
at the bottom of the link I posted (http://book.seaside.st/book/advanced/deployment/deployment-preparing) is a solution to removing extra /mysite (even using the Swazoo):
 
preferenceAt: #serverPath put: '/
 
 
HTH
 
Nick
 

 


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Deploying Seaside on a Swazoo Server

Paul DeBruicker
In reply to this post by Pat McDonald

> In reply to this post by Pat McDonald
> Hi Nick,
>
> Sorry but I don't get it :(.
>
> Let me explain a bit more. I have 2 small "private use" sites. I want to access them with their own domainname and that doesn't work.
>
> I can access them with my.domain1.com/domain1 and my.domain1.com/domain2 or my.domain2.com/domain1 and my.domain2.com/domain2, but using my.domain1.com or my.domain2.com just gets me the Welcome screen. I guess I must change the default of WADispatcher, but do I need to do this for both sites ?
>
> Pat

Does setting  the #serverHostname preference for each application. e.g.


For mydomain1 add this to your initialize method:

application
     preferenceAt: #serverHostname put: 'my.mydomain1.com'.

And for mydomain2 add this to your initialize method:

application
     preferenceAt: #serverHostname put: 'my.mydomain2.com'.

fix your issue?


I've never tried what your doing, so am just guessing.

Paul

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Deploying Seaside on a Swazoo Server

Pat McDonald
In reply to this post by Pat McDonald
Hi Paul,

That's exactly what I'm doing.

application 
    preferenceAt: #serverHostname put: 'my.domain1.com';
    preferenceAt: #serverPath put: '/'.

and the same for my other domain.

Now when I inspect my WASwazooAdaptor I only have one WAPluggableSite where I would suspect to have two or am I wrong here ?

Should I register my application in a different way ?

Pat

 

----- Original Message -----

From: Paul DeBruicker

Sent: 06/07/11 09:58 PM

To: [hidden email]

Subject: [Seaside] Re: Deploying Seaside on a Swazoo Server


 
> In reply to this post by Pat McDonald 
> Hi Nick, 
> 
> Sorry but I don't get it :(. 
> 
> Let me explain a bit more. I have 2 small "private use" sites. I want to access them with their own domainname and that doesn't work. 
> 
> I can access them with my.domain1.com/domain1 and my.domain1.com/domain2 or my.domain2.com/domain1 and my.domain2.com/domain2, but using my.domain1.com or my.domain2.com just gets me the Welcome screen. I guess I must change the default of WADispatcher, but do I need to do this for both sites ? 
> 
> Pat 

Does setting  the #serverHostname preference for each application. e.g. 


For mydomain1 add this to your initialize method: 

application 
     preferenceAt: #serverHostname put: 'my.mydomain1.com'. 

And for mydomain2 add this to your initialize method: 

application 
     preferenceAt: #serverHostname put: 'my.mydomain2.com'. 

fix your issue? 


I've never tried what your doing, so am just guessing. 

Paul 

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

 


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Deploying Seaside on a Swazoo Server

Johan Brichau-2
In reply to this post by Pat McDonald
Pat,

In order to dispatch incoming requests based on the server name, you need to set up an external http server that proxies requests to your Smalltalk http server(s) running the Seaside apps.
The Smalltalk http servers, like Swazoo, do not support virtual hosts (afaik).

If that is not an option for you, my guess would be to try to hack something using #initialRequest (see Seaside book) to redirect incoming requests to the other application. Or you might want to investigate the implementation of the handlers and see if you can implement something there to dispatch to a handler based on the server name. But setting up a front-end http server that proxies to the right url is probably going to take you less time.

Hope that helps
Johan

On 07 Jun 2011, at 21:28, Pat McDonald wrote:

> I can access them with my.domain1.com/domain1 and my.domain1.com/domain2 or my.domain2.com/domain1 and my.domain2.com/domain2, but using my.domain1.com or my.domain2.comjust gets me the Welcome screen. I guess I must change the default of WADispatcher, but do I need to do this for both sites ?

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Deploying Seaside on a Swazoo Server

Julian Fitzell-2
Maybe we should include a RequestHandler that dispatches according to the Host: header? Is that something people would find generally useful?

Julian

On Wed, Jun 8, 2011 at 7:35 AM, Johan Brichau <[hidden email]> wrote:
Pat,

In order to dispatch incoming requests based on the server name, you need to set up an external http server that proxies requests to your Smalltalk http server(s) running the Seaside apps.
The Smalltalk http servers, like Swazoo, do not support virtual hosts (afaik).

If that is not an option for you, my guess would be to try to hack something using #initialRequest (see Seaside book) to redirect incoming requests to the other application. Or you might want to investigate the implementation of the handlers and see if you can implement something there to dispatch to a handler based on the server name. But setting up a front-end http server that proxies to the right url is probably going to take you less time.

Hope that helps
Johan

On 07 Jun 2011, at 21:28, Pat McDonald wrote:

> I can access them with my.domain1.com/domain1 and my.domain1.com/domain2 or my.domain2.com/domain1 and my.domain2.com/domain2, but using my.domain1.com or my.domain2.comjust gets me the Welcome screen. I guess I must change the default of WADispatcher, but do I need to do this for both sites ?

_______________________________________________


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Deploying Seaside on a Swazoo Server

Philippe Marschall
In reply to this post by Johan Brichau-2
2011/6/8 Johan Brichau <[hidden email]>:
> Pat,
>
> In order to dispatch incoming requests based on the server name, you need to set up an external http server that proxies requests to your Smalltalk http server(s) running the Seaside apps.

A simple dispatcher that dispatches depending on the host name should do.

Cheers
Philippe
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Deploying Seaside on a Swazoo Server

Nick
In reply to this post by Julian Fitzell-2
Hi Julian,

Hopefully better late than never:

I just skimmed your blog post. Note that under "Alternative 2" at the
bottom, rather than changing the default dispatcher, you could also
just change the dispatcher associated with (possibly only one of) your
server adaptor(s):

aServerAdaptor requestHandler: myApplication

When #requestHandler is nil (the default state) it uses the default dispatcher.
 
I've cheekily added this info as a comment from you to my blog post and amended the blog post accordingly. Thanks for the tip.

> I've also written about it on my

Nick 

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