Welcome! Log In Create A New Profile

Advanced

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

Aleksandar Lazic
May 27, 2019 05:16PM
Hi.

Am 27.05.2019 um 19:51 schrieb Joey Côté:
> 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.

To verify your assumption please try to run haproxy in debug and take a look
what the backend sends you.

https://nginx.org/en/docs/debugging_log.html

> 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 http://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
>

_______________________________________________
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: 272
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