I have a wordpress site with nginx packed into a Docker image behind an AWS ELB Load Balancer. Only HTTPS is enabled on the load balancer.
When I access the URL: https://example.com/wp-admin/
it works fine but when I access the URL:
https://example.com/wp-admin
the server fails as it tries to redirect to url: http://example.com/wp-admin/
I found this thread which has similar issue and applies all three possible solution options suggested but it didn't workout for me.
Here is my nginx config file for the site
How do I prevent the HTTPS to HTTP redirect or redirect from HTTPS to HTTPS e.g: https://example.com/wp-admin
to https://example.com/wp-admin/