Home > other >  Reverse proxy does not work with https on ubuntu 20 using apache2
Reverse proxy does not work with https on ubuntu 20 using apache2

Time:12-25

I have a very simple Asp.net Core app that I published to my linux server. The app works perfectly and I used curl http://1270.0.0.1:5000 and curl https://1270.0.0.1:5001 to verify that.

I followed the instructions here: enter image description here

CodePudding user response:

After 2 long days, I solved it by disabling the default config for apache.

Appartentlly I had 2 virtual hosts for 443. The one I created and apache craeted a file default-ssl.conf

All I did was

  1. Disabled the default config a2dissite default-ssl
  2. Changed ProxyPreserveHost from ON to OFF
  3. Added SSLProxyCheckPeerName OFF
  4. And restarted apache systemctl restart apache2

Before you follow these steps, verify that you have the same problem by listing all files in /etc/apache2/sites-enabled. If you have more than one config to the same host and port, then you've the same problem.

  • Related