Hello!
On Mon, Oct 20, 2014 at 8:59 PM, Samarjit Uppal wrote:
> I want to redirect all my external traffic from lets say domain.com to
> domain.com:8090. This should not be a redirect in that the browser clients
> should not see a change in the url. Also, I do not want the 8090 port to be
> available directly. How can I achieve this in openresty/nginx?
>
One quick way (though not the most efficient way):
server {
server_name domain.com;
location / {
proxy_pass http://domain.com:8090;
}
}
But you will need more work if the response contents contain
hard-coded URLs pointing to domain.com:8090. In that case, the
ngx_sub_filter module or my ngx_replace_filter module can be handy :)
Regards,
-agentzh