I have a problem getting CloudFront to work with a BitNami Wordpress installation I’ve done on an EC2 instance.
This is my first time working with EC2, so please forgive my noob level in AWS knowledge.
I created an EC2 instance and installed Wordpress by BitNami via the marketplace. I kept all the basic settings. Screenshot here
I allocated a new elastic IP and associated it with the instance. Screenshot here
This is the public DNS (IPv4): ec2-35-169-133-115.compute-1.amazonaws.com
The weird thing is, when you visit the URL it only shows the following IP address in the browsers’ address bar: http://18.104.22.168
In all the tutorial videos I've watched, this doesn't happen. It only seems to happen to me. Does anyone know why and how to disable this?
Next I created a new CloudFront distribution with ‘ec2-35-169-133-115.compute-1.amazonaws.com’ as my origin and entered my domain name ’voucherchampion.com’ as Alternate Domain Name (CNAMEs). Screenshot here
I set up a new Route 53 hosted zone and created a ‘A’ record set with my CloudFront URL as the alias target (dx9tz3fhvx56h.cloudfront.net.). Screenshot here
I changed the DNS settings in my NameCheap dashboard (where I bought the domain name) to match the route 53 name server values. Screenshot here
Now where I visit voucherchampion.com, it goes to my Wordpress installation, but:
1) Shows the elastic IP in the address bar instead of the domain name
2) Doesn’t use CloudFront.
I suspect it has something to do with:
‘ec2-35-169-133-115.compute-1.amazonaws.com’ redirecting to ’22.214.171.124’.
Does anyone know how I can get CloudFront to work and how to show my domain name in the address bar?
Thanks in advance.