Jenkins behind an ALB redirects https to http on login and save

Viewed 11

Problem

On submit/save actions, Jenkins improperly redirects to http on port 443 causing the error message to be returned The plain HTTP request was sent to HTTPS port

High Level Architecture

enter image description here

  • In AWS, an ACM is attached to the ALB
  • A listener rule in the ALB is configured to redirect http to https
  • By default redirect 8080 to 443 enter image description here
  • The Jenkins Server is behind nginx and listens to port 8080

Steps to Reproduce the Issue

  1. In your browser, go to http://myjenkinsexample.com:8080
  2. http://myjenkinsexample.com:8080 is redirected to https://myjenkinsexample.com
  3. Click Login and submit login credentials
  4. ERROR
  • Browser redirected to http://myjenkinsexample.com:443
  • An error page is displayed with the following error

400 Bad Request, The plain HTTP request was sent to HTTPS port

enter image description here

Question

Where do I fix the configuration so that on "submit" requests, it redirects to https on 443?

0 Answers
Related