0

I have a nginx reverse proxy set up with this configuration:

location /auth {
   proxy_pass http://example.com:8083;
}

location /blog {
   proxy_pass http://example.com:8082;
}

The blog docker container is an angular website running on a nginx:1.10-alpine image on port 8082 and it works well.

The auth docker container is a spring-boot war application running on a java:8-jre-alpine image on port 8086. Unfortunately, this proxy_pass mapping does not work.

Am I missing something? Do I need a special nginx setup for a java application?

louis amoros
  • 101
  • 2

1 Answers1

0

I forgot the / after the port number. Here is the correct configuration:

location /auth {
   proxy_pass http://example.com:8083/; // slash is important
}

location /blog {
   proxy_pass http://example.com:8082;
}
louis amoros
  • 101
  • 2