Exposing external JSON API in an Nginx custom path?

Francis Daly francis at daoine.org
Mon Nov 12 11:12:22 UTC 2018


On Mon, Nov 12, 2018 at 03:03:39AM +0000, Moorage via nginx wrote:

Hi there,

> The secret-sauce recipe was:
> 
> in the mesh-ui config
> 
>     apiUrl: '/mesh/api/v1/',
> 
> and in nginx
> 
> 	location ^~ /mesh/ {
> 		...
> 		proxy_pass http://meshproxy/;
> 		proxy_redirect / /mesh/;
> 		...
> 
> it now works as hoped.

Good to hear; thanks for letting the list know, so that the next person
with the issue will be able to find the answer too.

>From briefly looking at the Gentics Mesh documentation, it appears that
you might want to configure a few other parts of it to include the
"/mesh" prefix too, if you want to expose those parts through the nginx
reverse proxy.

/mesh-ui/ and /demo/ are things that may want to be changed -- but it
is also probably reasonable not to make those available externally.

Cheers,

	f
-- 
Francis Daly        francis at daoine.org


More information about the nginx mailing list