reverse proxy - http (80) to https (back-end) in Docker container
Aleksandar Lazic
al-nginx at none.at
Mon May 27 21:14:15 UTC 2019
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 at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
More information about the nginx
mailing list