Forum OpenACS Q&A: Re: Reverse proxy for multi domain

Collapse
Posted by Jon Griffin on
Malte,
I just got rid of my squid cache and wonder if the following might work?

I have nginx running on my firewall but have several servers that host sites. Everything works fine, but I would like to cache the static content which I can't do because the content is not local.

I probably need nginx forwarding to nginx on the local machine. The problem is this is a live setup so I don't want to screw around to much.

I do have to say, it is much better than squid. And I never could get pound to work right. This was easy.

Collapse
Posted by Malte Sussdorff on
For resources I just copy them over, so everything under $package/resources comes on the NGINX server under /web/resources/$package and NGINX is configured to get it from there.

For static content that resides in /www, you can mount those directories via NFS and have NGINX pull it from there, or, alternatively, and much better if you do not change static files often, run RSYNC on a regular basis.

I would not recommend setting up a local NGINX for the static files, as you loose the benefit of not having to pull the files from the server running AOLserver.

Also be aware that a good practice for me was to use NGINX for SSL and not AOLserver (reduces load on the NSD process).

And you can do reverse proxy based on URL, which means you can run part of the URL (e.g. like /image, /file, /shared/portrait-bits) from an AOLserver just used for CR File distribution.