title: How to configure SSL on Spring Boot - Angular app on EC2 instance
body: <p>I can't get my backend to send data after switching to secure connection.</p>
  <p>I was able to successfully configure SSL with ssl_mod on Apache web server that serves my Angular app on AWS Linux 2 instance, the site is secure - but my Spring Boot backend is not responding, it is not sending any data. When I additionally convert .crt and .key files to PK12 that Spring understands and I use it in Spring app - I get this error:</p>
  <pre><code>net::ERR_SSL_PROTOCOL_ERROR
  </code></pre>
  <p>I've tried using AWS Load Balancer, but same thing happens, frontend is loaded in secure environment, but backend is not sending any data even after I change backend calls from http to <a href="https://my-site.com" rel="nofollow noreferrer">https://my-site.com</a>. I've tried following documentation and added this to my backend app properties file:</p>
  <pre><code>server.tomcat.remoteip.remote-ip-header=x-forwarded-for
  server.tomcat.remoteip.protocol-header=x-forwarded-proto
  </code></pre>
  <p>and security configuration upgraded with this:</p>
  <pre><code> http.requiresChannel().anyRequest().requiresSecure()...
  </code></pre>
  <ul>
  <li>but to no avail.</li>
  </ul>
  <p>Lastly, I created a new instance on EC2 and this time I didn't configure apache for the frontend on linux, I just used SSL certificate on my backend app with following properties:</p>
  <pre><code>server.ssl.enabled=true
  server.ssl.key-store=/etc/ssl/mydomain_com.p12
  server.ssl.key-store-password=******
  server.ssl.key-alias=mydomain
  </code></pre>
  <p>To no avail, now my site doesn't load at all. I'm despearate, struggling with this for a week now. What is the procedure for a full stack app? How do I do it?</p>