I am trying to get this thing working in a (very) complicated AWS structure, consisting of:
CloudFront
Load Balancer
Target Group
Apache2
Django
The good thing is that the AWS stuff has been verified to not be the cause of any issues...
The DNS is registered by a local registrar, and transferred to Route 53.
The issues emerged when I tried to transition from http to https, finally ending up with a DIY solution:
ServerName: suhozid.hr
ServerAlias: 3.124.4.144
Redirect permanent / https://suhozid.hr
The issue I am having is - any POST requests (registering new users) are ending up in a 500 error...
Does your CloudFront distribution Behavior allow POST? I'm not sure what error C/F issues in that case but worth checking.
Even if this isn't the reason a 500 failure on a POST when GET works fine would not be a certificate problem. That's a server or other config problem. Have you checked your Apache logs for more info about the 500?
The only certificate problem I see is if someone tries https://www.suhozid.hr
Those people will get an invalid cert error as its cert only covers the apex domain name. Your www subdomain has the DNS pointing directly to EC2 (not CloudFront) and properly redirects HTTP to HTTPS. It just doesn't have the right cert if someone sends it an HTTPS request.