Please let me understand the questions:
You have an AMI (OS is Ubuntu 22) and you have installed and configured Apache2 and WordPress on this AMI. You have a hosted zone which has a FQDN with A record, and CNAME which points to FQDN, even though there are two URLs but point to the same address, FQDN.
Or, you have created another hosted zone for your subdomain which is not functioning as per your requirements.
Do these two instances have the same configuration, such as Apache2, WordPress, Virtual Host, and SSL/TLS configuration?
Second part of the question is the problem with SSL/TLS certificate. Did you create the SSL/TLS for both FQDN and CNAME (subdomain) together or separately? Did you create SSL/TLS before opening the WordPress/wp-admin or after the opening WordPress/wp-admin? Do you have a caa record in the hosted zone?
Resolution
It appears protocol issues. If you have configured SSL/TLS after configuring the WordPress/wp-admin, such as http. After configuring SSL/TLS the WordPress/wp-admin will not open with the newly configured https (SSL/TLS).
You could make a snapshot of the original AMI and make an instance out of it, instead of creating of a new instance. You should create the SSL/TLS certificate first, before opening the WordPress/wp-admin site. You can remove/delete the SSL/TLS certificate with the appropriate command.
Check your /etc/hosts file, whether the IP addresses are correct, as well for both instances.
Please do not hesitate to contact with further information.
Relevant content
- asked 2 years ago
- asked 3 years ago
- asked 17 days ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 months ago
- AWS OFFICIALUpdated 2 months ago
- AWS OFFICIALUpdated a year ago