0
votes

I'm using the following nginx.conf configurations to work with my front-end and backend services. Front-end has been added to the route directory of the nginx and the backend has been deployed in to the same server but with port 8080. I have configured the proxy_pass to work with my backend, and the configurations is given below.

server {
    listen       80;
    listen       [::]:80;
    server_name  _;
    root         /usr/share/nginx/html;

    # Load configuration files for the default server block.
    include /etc/nginx/default.d/*.conf;

    location = /404.html {
    }

    error_page 500 502 503 504 /50x.html;
    location = /50x.html {
    }

    location /be {
      proxy_pass http://localhost:8080;
    }
}

According to the configurations, when I try access my nginx with http://my-server-dns/ which redirects to the front-end and which works as expected, but when I try to access my backend with its healthcheck using https://my-server-dns/be/v1/health which is giving me white label error as below (403)

enter image description here

Can anyone help me to resolve this white label issue, ultimate goal is if I run any postfix of the url that should load it to the corresponded web page. (http://my-server-dns/be///*)

Thanks.

The Whitelabel Error Page is coming from Spring, so it seems more like an issue there…slauth