Yaws like PROXY to another Yaws on another physical server. How?

Hello all!

Usually we using NGINX like proxy-frontend for different Web projects. It’s kind of security gate. Is there any option to use Yaws for the same purpose? Is it possible do make kind of programmable PROXY based on Yaws which checking Authorisation by custom HTTP headers?

Hi alexandr,

There is a revproxy option for yaws.conf which enables you to use yaws as a reverse proxy.

It can be used in various ways and can enable you to set reverse proxy urls for various paths.

You can also rewrite requests and rewrite responses using an intercepting module.

You can read about by searching for revproxy in the yaws.pdf file.

If you are also into the use of lua for scripting this kind of functionality you could use luerl in the callbacks for the intercepting module for processing the request.you could keep the lua code for processing the requests in the priv folder,database,etc.. then load it in ets on startup and then run the request through the lua code using luerl in the callback for the intercepting module.

1 Like

Thx for reply. Will check and test it. Will reply here soon about results.