Issue
I've got EC2 Amazon Linux 2 instance with apache, mariadb and wordpress
- VPC, Security group, ACL are set up correctly, i'm using same rules for other websites and works perfectly
- telnet ip 443 and telnet ip 80 - both are reachable, checked and connected
- I don't have access to DNSes, so I changed windows host file. Both are pointing to the same ip.
- x.x.x.x example.com
- x.x.x.x example.sandbox.com
- ping recognize both and showing that there is no issue with host file.
- First website with SSL.
- Second website without SSL (tests purposes).
- They are using same database but different schema. So table wp_options and value for home and siteurl are set up correctly for https://example.com for first one and http://example.sandbox.com for test one.
First website is working fine, showing example.com with SSL. Nothing to do. Problem is with test environment. Everytime I try to reach example.sandbox.com chrome first shows me warning that page is not secured (expected) and after that redirects me to example.com. Same with Firefox. After added exception it redirects me to example.com. I run out of ideas...
Apache configs in comment. Have no idea how to paste it into post without error. Spent hour on it...
Solution
Found it! Wordpress plugin really-simple-ssl. Removed it and it works.
Answered By - Kamil Karczewski