Server configuration questions

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

Server configuration questions

Phil B
I've been looking for information on how to change a couple of server configuration settings without much success and was hoping that someone could point me in the right direction on how to:

1) Have Seaside listen only on the loopback (127.0.0.1) interface

2) Change the Seaside 'root' from '/' to something like '/seaside'

Any assistance is appreciated.

Thanks,
Phil

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

Re: Server configuration questions

Sven Van Caekenberghe-2
Hi Phil,

On 01 Jul 2013, at 21:36, "Phil (list)" <[hidden email]> wrote:

> I've been looking for information on how to change a couple of server configuration settings without much success and was hoping that someone could point me in the right direction on how to:
>
> 1) Have Seaside listen only on the loopback (127.0.0.1) interface
>
> 2) Change the Seaside 'root' from '/' to something like '/seaside'
>
> Any assistance is appreciated.

Both can be done with ZnZincServerAdaptor.

Make sure that you load the latest Zn code and have a look at

        ZnSeasideZincServerAdaptorDelegate class>>#installInServer:underPrefix:

        ZnServer>>#bindingAddress:

So first you would create and configure a ZnServer, bound to #[127 0 0 1], then install the right delegate in it, and finally start it.

Now, this is non standard stuff, so you it might require some tweaking and/or debugging ;-)

Regards,

Sven

> Thanks,
> Phil
>
> _______________________________________________
> seaside-dev mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev

--
Sven Van Caekenberghe
Proudly supporting Pharo
http://pharo.org
http://association.pharo.org
http://consortium.pharo.org




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

Re: Server configuration questions

Phil B
Sven,

On Jul 1, 2013, at 4:01 PM, Sven Van Caekenberghe wrote:

> Both can be done with ZnZincServerAdaptor.
>
> Make sure that you load the latest Zn code and have a look at
>
> ZnSeasideZincServerAdaptorDelegate class>>#installInServer:underPrefix:
>
> ZnServer>>#bindingAddress:
>
> So first you would create and configure a ZnServer, bound to #[127 0 0 1], then install the right delegate in it, and finally start it.
>
> Now, this is non standard stuff, so you it might require some tweaking and/or debugging ;-)
>
> Regards,
>
> Sven
>

Thank you... that works quite nicely!  One minor edit is that ZnSeasideServerAdaptorDelegate was the class for the delegate but it was otherwise very straightforward.  Seaside is now listening only on loopback at /seaside but I noticed that Zinc is still listening at / and serving up some default content:

"Zn
Zinc HTTP Components

Welcome to Zinc HTTP Components, a modern, open-source Smalltalk framework to deal with the HTTP networking protocol.

Project homepage http://zn.stfx.eu
Locally available pages /help
May the Source be with you!"

Any suggestions on how to get rid of that and any other default paths (not sure if it serves up any admin/stats pages like Apache can) Zinc might respond to?

Thanks,
Phil_______________________________________________
seaside-dev mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
Reply | Threaded
Open this post in threaded view
|

Re: Server configuration questions

Sven Van Caekenberghe-2

On 02 Jul 2013, at 00:11, "Phil (list)" <[hidden email]> wrote:

> Sven,
>
> On Jul 1, 2013, at 4:01 PM, Sven Van Caekenberghe wrote:
>
>> Both can be done with ZnZincServerAdaptor.
>>
>> Make sure that you load the latest Zn code and have a look at
>>
>> ZnSeasideZincServerAdaptorDelegate class>>#installInServer:underPrefix:
>>
>> ZnServer>>#bindingAddress:
>>
>> So first you would create and configure a ZnServer, bound to #[127 0 0 1], then install the right delegate in it, and finally start it.
>>
>> Now, this is non standard stuff, so you it might require some tweaking and/or debugging ;-)
>>
>> Regards,
>>
>> Sven
>>
>
> Thank you... that works quite nicely!  

Great !

> One minor edit is that ZnSeasideServerAdaptorDelegate was the class for the delegate but it was otherwise very straightforward.  Seaside is now listening only on loopback at /seaside but I noticed that Zinc is still listening at / and serving up some default content:
>
> "Zn
> Zinc HTTP Components
>
> Welcome to Zinc HTTP Components, a modern, open-source Smalltalk framework to deal with the HTTP networking protocol.
>
> Project homepage http://zn.stfx.eu
> Locally available pages /help
> May the Source be with you!"
>
> Any suggestions on how to get rid of that and any other default paths (not sure if it serves up any admin/stats pages like Apache can) Zinc might respond to?

Zinc does have indeed a number of such pages, try /help for a listing, /status is one of them.

I thought you liked them ;-)

Anyway, what #installInServer:underPrefix: does is add a /seaside handler/path/route to the existing handlers/paths/routes of the ZnDefaultServerDelegate inside the ZnServer. What you need to do is play with those: either remove existing ones (prefixMap removeAll before installing) or replace the whole delegate, but I haven't tried that last one myself.

Sven

PS: #logToTranscript and #debugMode: true can be helpful to see what is going on.

> Thanks,
> Phil_______________________________________________
> seaside-dev mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev

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

Re: Server configuration questions

Phil B
Sven,

On Jul 1, 2013, at 6:42 PM, Sven Van Caekenberghe wrote:

>
> Zinc does have indeed a number of such pages, try /help for a listing, /status is one of them.
>

I figured as much and thanks for the pointer.

> I thought you liked them ;-)
>

While in development, sure :-)

> Anyway, what #installInServer:underPrefix: does is add a /seaside handler/path/route to the existing handlers/paths/routes of the ZnDefaultServerDelegate inside the ZnServer. What you need to do is play with those: either remove existing ones (prefixMap removeAll before installing) or replace the whole delegate, but I haven't tried that last one myself.
>

Excellent... that gives me the starting point I was looking for to start poking around.

Thanks,
Phil

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