I am receiving some issues on Drupal.
I have integrated Amazon cloudfront with Drupal.
The Cloudfront origin for my domain is drupal.example.com and Cnames are www.example.com and example.com.
The problem is that some images are
are forming the URL's like this
data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7
Please suggest.
Our website mywebsite.com is currently managed by Wix DNS. We wanted to create a subdomain api.mywebsite.com to forward requests to aws api gateway. Here are the steps I tried
Created an ACM certificate for *.mywebsite.com
In AWS console API gateway I created a custom domain and associated it with ACM certificated I created about. I got a cloudfront target domain name somecloudfrontid.cloudfront.net
I created a CNAME record in wix that points api.mywebsite.com to somecloudfrontid.cloudfront.net.
But, when I tried to hit api.mywebsite.com I get this error:
ERROR
The request could not be satisfied.
Bad request. Generated by cloudfront (CloudFront)
Am I missing any step? How can I get this working? Do I need to transfer my domain to AWS router 53 to make it work with AWS?
I suggest transferring the domain to Route53. There you can create an alias for your subdomain under Hosted Zones, and point it directly to your cloudfront target domain, as well as several other AWS resources quite easily.
I come from AWS Cloudfront where I can create multiple origins for a given endpoint.
I can serve part of the url from one origin and part from another origin.
Is there anyway we can do with Azure CDN Verizon Edgecast Premium?
EDIT1: (Cloudfront Example with Single Distribution)
https://example.com/origin1/index.html <-- This is served from origin1
https://example.com/origin2/index.html <-- This is served from origin2
or like this also,
https://example.com/endpoint/index.html <-- comes from origin1
https://example.com/endpoint/index1.html <-- comes from origin2
Here is how I solved it. Looks horrible in the modern era, but it is what it is at the time of this writing.
If you want to have multiple origins. Create one endpoint for each origin.
Endpoint1 --> Origin1
Endpoint2 --> Origin2
Create another endpoint Endpoint to create rewrite rules to those endpoints with a rewrite rule.
Endpoint3/origin1 rewrite to Endpoint1
Endpoint3/origin3 rewrite to Endpoint2
You can create rewrite rules only to other endpoints and not to any origin.
Hope it helps.
I have a static website hosted on a Google Cloud Storage Bucket. I also have moved the DNS to Google Cloud DNS. So everything is in control on the Google Cloud Platform.
I only have some problems left:
How to solve www / non-www requests? I pointed the non-www now to a server outside the google cloud platform which redirects to www. I don't see another possibility to refer both directly to the same bucket.
How to solve http / https? SSL is not possible yet on buckets. The https version can be reached ofcourse, but I get a warning and the googlebot has problems with it too. For some reason they indexed some https versions of some pages while I have set canonical links to the https version. And I don't see any possibilities to set up redirects correctly.
Unfortunately, that is not possible at this time. When using CNAME redirects to GCS, a bucket must exactly match the specified domain. You may not map several domain names to one bucket or vice versa.
Furthermore, "domain.com" with no subdomain is, unfortunately, right out, as DNS CNAMEs cannot be set on root domains.
I'm working on a little webapp (all client-side) I want to host it on Amazon S3. I've found several guides on this and have managed to create myself a bucket (with the same name as my domain), set it as a website and upload some content.
Where I'm struggling, and where all the documentation starts to get a bit vague, is how to properly configure my DNS.
All my registrar (123-reg) could suggest was web forwarding which gives me mydomain.com.s3.amazonaws.com
What do I have to configure, and where (ie. 123-reg / Amazon) can I get a clean URL?
Sounds like you've done most of the work already. For clarity I'll go over those steps again just to make sure you're set up properly:
Create an s3 bucket using your domain name as the bucket name (your bucket name should be www.example.com if you want your site to be example.com or www.example.com)
Upload your content to the s3 bucket. Choose a consistent name for your website index files (index.html usually). You can also upload a custom page for 404 Not Found errors. Call this 404.html. Give Read permissions to every file in your website so that the public can view it. Don't give any extra permissions to the bucket, just the files within.
Configure your bucket as a website. With the AWS console ( https://console.aws.amazon.com/s3/ ) you can select your bucket, click properties, then select the "Website" tab. Click enabled and set your index document to index.html and your error document to 404.html. You will also need to set your bucket with access permissions to allow access via the web (http://docs.amazonwebservices.com/AmazonS3/latest/dev/WebsiteAccessPermissionsReqd.html)
Take a note of the "Endpoint" URL in the website configuration tab. This is where your website lives. You can open the link in a new window and you should see your website just as it will look. Click around and make sure everything works as expected.
You MUST use the endpoint address in all steps below. The normal www.example.com.s3.amazonaws.com won't work - you need to use the regional version (http://www.example.com.s3-website-us-east-1.amazonaws.com/)
Now, we can set up the DNS to give you a clean, custom URL.
First, we will map www.example.com to your site.
Using your DNS provider's tools, (123-reg in your case) you need to create a CNAME record to map www.example.com to www.example.com.s3-website-us-east-1.amazonaws.com
The CNAME is the only thing you need if you just want www.example.com. Most people also want example.com to work so we need another step.
example.com is often referred to as a naked domain or the apex record of the domain. The reason it's a problem is that it can't be a CNAME. CNAMEs only work on subdomains like "www." This makes it more difficult to point at s3.
The usual approach is to use a service to automatically redirect any request going to example.com to point to www.example.com. This will then pick up your CNAME record and your site will be served from s3.
The automatic redirect is not possible with plain old DNS so you have to use another service. Some DNS providers offer this service along with their DNS (GoDaddy does, amazon route53 does not. Not sure about 123-reg)
If your DNS provider doesn't do it, there are a few free services. One that I've used is http://wwwizer.com/naked-domain-redirect - it doesn't require any registration or payment.
To use this type of service, you need to create a DNS "A" record for your naked domain. For the wwwizer.com service, you would need to create an A record to point example.com to 174.129.25.170. That's all!
So, with this setup, if a user types example.com into their browser, the following would happen:
DNS query: example.com -> 174.129.25.170 (wwwizer.com's service)
HTTP request to 174.129.25.170 for example.com
174.129.25.170 redirects example.com -> www.example.com
DNS query: www.example.com -> CNAME to www.example.com.s3-website-us-east-1.amazonaws.com
DNS query: www.example.com.s3-website-us-east-1.amazonaws.com -> points to Amazon S3
HTTP request for www.example.com is now served by Amazon S3
Enjoy!
Update 2019
As of today following DNS setting worked for me to get AWS S3 static website working :
I believe you must select all docs in your bucket, right click, and choose "Make Public". You must do this every time something changes in the bucket as well. I then usually right click on bucket, choose properties, choose permissions in right hand pane then add "Everyone as a "grantee" then give them only "list" permissions. The rest of your article is excellent. The part about the naked domain helped me resolve my issues. You can also have the naked domain redirected to the www domain within S3 under "Static Website Hosting" It's probably the easiest way.
Thanks again for all your help.
Tim
From the Advanced DNS screen on your 123-reg control panel
I started by clicking the "Reset DNS" button to the default 123-reg settings.
This gave me the following;
DNS EntryType PriorityTTLDestination/Target
* A 81.xx.xx.xx
# A 81.xx.xx.xx
# MX 10 xx0.123-reg.co.uk
# MX 20 xx1.123-reg.co.uk
I then added this entry
www CNAME www.example.com.s3-website-us-east-1.amazonaws.com
From their Manage DNS guide pdf it says the "# record" refers to "your domain in its purest form with no subdomain" ie the naked domain stackoverflow.com
But it doesn't mention what the "* record" is, I assumed it would be to catch all sub domains and thought it might over ride the CNAME record but this does not appear to be the case.