简体   繁体   中英

How do I set up AWS Route 53 to handle an EC2 single instance domain

I have thoroughly reviewed both the Amazon Web Services documentation and many Stackoverflow posts related to my issue, but have not yet resolved it. My situation:

I have successfully set up:

  1. an EC2 t2.micro instance with elastic IP, running Ubuntu 14.04.01 / Apache2 / PHP / MySQL (LAMP)
  2. WordPress 4.5 as a content management system
  3. CiviCRM 4.1 as a constituent management app

I am able to access and run this configuration with the public DNS linked to the Elastic IP. I have a custom domain (mydomain.org) registered through Amazon Route 53 and have set up the necessary record sets (A, CNAME) to connect both mydomain.org and www.mydomain.org to the EIP. This configuration, accessed with HTTP, correctly serves the base page of the app, and I see what I expect from WordPress, with mydomain.org showing in the browser address window.

When I navigate to any other page, it breaks. I see the page, but the displayed URL is that of the EIP public DNS, not my custom domain. I suspect that rewriting the URL in the Virtual Hosts section of my provide a solution, but I haven't been able to determine the proper statements.

Further, I need to have this configuration support TLS / HTTPS. I have successfully obtained and installed the necessary certificates and set them up in my server configuration. I have edited the ssl.conf Virtual Hosts file, and have even been able, using HTTPS to successfully navigate to the base page of WordPress. It shows the basic HTML of the page, but all of the script driven formatting is missing. Again, navigating to any other page of the app breaks the TLS by using the EIP URL, not my custom URL.

I suspect the same solution to the initial issue will fix this issue, as well.

Thank you, in advance, for your advice and suggestions.

Bruce P pointed me in a good direction. I checked VirtualHosts in my .conf file; found it OK. Looked for httpd.conf without success, and reviewed my WordPress configuration, which is where I found the problem. The server information was not updated to reflect the changed URL. When I did that, all significant problems were resolved. Thanks, again, to Bruce P for pointing me in a good direction.

DVH

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM