Welcome! Log In Create A New Profile

Advanced

reverse proxy - http (80) to https (back-end) in Docker container

Joey Côté
May 27, 2019 01:52PM
Hello all,

I am attempting to use nginx as a reverse proxy to funnel HTTP traffic to a
HTTPS back-end (both in a Docker container). I cannot enable HTTPS on my
front-end yet, so this would be a temporary solution to my issue.

Only one of my back-end application is giving me an issue right now, and
that issue seems to be characterized by the JSESSIOND cookie coming from
the back-end being lost at the nginx level. If I test outside Docker with
SSL, I get a JSESSIONID cookie in my request back.

My two URLs are [example]:
http://myurl.example.com/AppA
http://myurl.example.com/AppB

I believe that I may need to enable SSL certificates between nginx and my
back-ends, but I couldn't find clear indications on how to do this online.

My nginx config file looks like this:

worker_processes 1;
daemon off;

events {
worker_connections 1024;
}

http {
access_log /dev/stdout;
error_log /dev/stderr warn;

server {
listen 80;
server_name myurl.example.com;

location /AppA {
proxy_pass https://localhost:9443;
}

location /AppB {
proxy_pass https://localhost:9043;
}
}
}

Thank you for any assistance you can provide.

JC
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

reverse proxy - http (80) to https (back-end) in Docker container

Joey Côté May 27, 2019 01:52PM

Re: reverse proxy - http (80) to https (back-end) in Docker container

Aleksandar Lazic May 27, 2019 05:16PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 261
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready