Https behind apache proxy switches to http after login

Hello.
we run Jenkins (2.289, Oracle JDK 1.8.0_152) behind an apache proxy to cover it with https. this basically works fine but I just mentioned that after loging in, it falls back to http. Login form is still in https but after, the dashboard (or login error message) comes up with http.
In my configuration, Jenkins URL is set to https.

Does someone have an idea what happens there and how to repair this?

Maybe my apache config is wrong? Its relatively basic…

<VirtualHost *:80>
ServerAdmin webmaster@dummy-host.example.com
ServerName jenkins.entw
ServerAlias jenkins

ProxyPass / http://localhost:8030/ nocanon
ProxyPassReverse / http://localhost:8030/
ProxyRequests Off
AllowEncodedSlashes On
ServerAdmin webmaster@dummy-host.example.com ServerName jenkins.entw:443 ServerAlias jenkins:443
SSLEngine On
SSLCertificateFile /etc/httpd/ssl/jenkins.crt
SSLCertificateKeyFile /etc/httpd/ssl/jenkins.key

ProxyPass / http://localhost:8030/ nocanon
ProxyPassReverse / http://localhost:8030/
ProxyRequests Off
AllowEncodedSlashes On

Okay I wasn’t sure Jenkins specifically handled X-Forwarded-Proto but Reverse proxy - Issues seems to say yes

The last section of Reverse proxy - Apache shows how

Well, I’ read over it and try.
thanks!

I can’t find anything good on apache, but based on my own nginx configs, best to set the 3 headers

x-forwarded-for - what IP accessed the proxy
x-forwarded-host - what hostname was accessed on the proxy
x-forwarded-proto - what schema (http/https) was accessed on the proxy

If i only could as I wish… :wink:

x-forwarded works well :slight_smile: