[Seaside] Nginx Reverse Proxying

Esteban A. Maringolo emaringolo at gmail.com
Thu Dec 12 18:44:28 UTC 2013


Hi there,

I continue with my server setup...

I'm trying to setup nginx as the HTTP front end.

I have two servers, one for the Zinc SeasideAdaptor running on 8080
and another server running on 8081 (maybe there is a way to run both
on the same server).

ZnZincServerAdaptor  startOn: 8080.
ZnServer startDefaultOn: 8081.
ZnServer default delegate: (ZnWebSocketDelegate map: 'ws' to: MyWsHandler new).

In the Seaside side I have three "entry points":
/app  : which is a standard Seaside application
/app-api/v1/ :which is a WARestfulHandler (REST API, with Basic HTTP Auth)
/assets (File Directory for static files)

I plan to put a nginx in front of those services, mainly for
performance purpose of static file serving, and to avoid the exposure
of my server directy to internet.

Supposing the hostname is app01.mydomain.com ?

My requirements are

1) I want that http://app01.mydomain.com/app be forwarded to
http://localhost:8080/app, the same with app-api
2) Same for websockets, maybe to http://ws01.mydomain.com to
http://localhost:8081/ws
3) http://app01.mydomain.com/assets be served statically.

I know this is a request which isn't directly related with Pharo nor
Seaside, but given the fact it's a common setup I hope somebody will
help me with this. Sorry for the crosspost.

Regards,



Esteban A. Maringolo


More information about the seaside mailing list