Hosting a Tumblr blog on Amazon Web Services as subdomain - amazon-web-services

How do I use a custom (sub)domain (or secondary page) on AWS to 'host' a Tumblr blog?
I'm using Amazon S3, CloudFront, and Route 53 to host a static website. The static news/blog section I've made lives under http://wavefrontbiometric.com/news.html. So far, so good.
Now I've set up a blog/news page on Tumblr (so http://wavefrontbiometric.tumblr.com) that I want to have replace http://wavefrontbiometric.com/news.html. I understand that this might need to change to a two-level structure http://news.wavefrontbiometric.com/), and that's fine.
So far I've tried following these instructions from Tumblr, but with no luck. I've added a 'Hosted Zone' on Route 53 for http://news.wavefrontbiometric.com/, but failed to point the C-NAME record to 'domains.tumblr.com'.
Basically I'm using Tumblr as a backend for the news page only. Users shouldn't be able to notice any visual difference from any other page. I've already got my HTML & CSS markup perfected.
Any help is much appreciated. Thank you.

The only interaction between Tumblr and your (sub)domain is Route53. No other services are needed. Your subdomain should be a CNAME as shown in the instructions; if that isn't working, something is wrong in your Tumblr configuration, which is outside the scope of stackoverflow.

Related

How to host static website of 'multiple pages' on google cloud

I have followed everything from the above link. By following the link .I had hosted my website on google cloud. My static website contains multiple pages(5 pages). In the hosted website I cant find images and other html pages except "index.html" page.
Can anyone please help me by letting me know how to host static website of multiple pages and letting me know how to keep my website secured?, so it would be very helpful for me.
https://codelabs.developers.google.com/codelabs/cloud-webapp-hosting-gcs#5
i think reason behind image is not loading is
you examine the file paths for your files, also be sure that you spelled the name of the image correctly.
refer this link for more details.
Since you didn't provide any more details I can only give you some pointers on what to focus on.
Create a bucket named www.yourdomain.com - www is very important unless you just want to use just yourdomain.com.
Change access permissions so everyone can read it's contents.
Upload your files to the main directory. When someone accesses the site first file that GCP will look for is index.html so make it your home page. Make sure you uploaded all of them. If the images in your page are stored in a folder (img, images etc) then upload that folder with the files inside to your bucket. From your description it looks like either you're missing them or they are in the wrong folder.
Obtain your own SSL certificate or use GCP's managed certificate (free of charge)
Set up a load balancer
Point your domain to your LB's external IP
At that point you're ready to go and your site is up & running.
If this is the first time you're doing it I recommend to start from readin official documentation on how to set up a static website in GCP.
You can access your site without using load balancer to check if it's running correctly by using a link in the format https://storage.googleapis.com/my-bucket/my-object. Have a look at the truobleshooting static websites to get more insight.
Have a look at my other answer covering this topic: https://stackoverflow.com/a/64442826/12257250
Alternatively you can try hosting your site using firebase.

Force Webpage to be Inaccessible on AWS EC2

I have a website that is being hosted in an AWS EC2 instance. I am using AWS RHEL (the default EC2 option).
Currently, my hosted site (on the instance) is located at: /var/www/public_html/gitRepoName/index.html.
Lets say I have 3 webpages in the directory gitRepoName. So, that would be index.html, aboutMe.html, and adminPage.html. How can I configure the instance such that nobody can manually type in myUrl.com/adminPage.html and get the admin page as a result?
In other words, how do I make sure that my individual webpages can only be accessed via clicking proper href tags I made, and they cannot be accessed by hard-typing in a link. Please comment with any questions.
Thanks in advance for the help!
This is something you have to build on the web page and not on the ec2 itself.You can use php script to get the HTTP_REFERER and check the value is equal to "myUrl.com/index.html"
The code in adminPage would be something like below:
<?php
$ref=$_SERVER['HTTP_REFERER'];
if ($ref!="myUrl.com/index.html")
{
......redirect to index.html
}
?>
I have mentioned the php example since you have not mentioned what script language you are using.If you are using HTML/Javascript then try with document.referrer property in HTML dom.

How do I point my domain name from hostgator to heroku

I'm trying to point my hostgator domain name to my heroku app, but I keep getting the error when I try to manage my domain names.
An error occurred. Please verify the validity of your nameservers and try again.
I've already added the domain name to heroku in the sites dashboard > settings. My app is free, I'm ready to move up and pay for the full version. I've been figuring some things out and I am ready to deploy. And to do this I have to point my domain name to heroku. I know I'm missing something. I've read the docs already, a lot, But it's not all the way clear. I know it's something simple I'm missing. Thanks in advance
EDIT. I don't want my domain to be a subdoamain. I want it to be the main domain. because you can't monetize a site that is a subdomain.
EDIT to be clear I want the domain name mysite.com from hostgator to be used with my heroku app. So when I type mysite.com my heroku app appears. I want my heroku app to go from this
mysite.herokuapp.com
to this
mysite.com
and I do not want it to be a subdomain
I'm going to outline two approaches here. One works if you still have cpanel because you're paying for hosting with HostGator. (That makes no sense if you're using Heroku for hosting, so it's not a long term solution.) The other works if you just have a domain registered with HostGator and theoretically in either case.
Either way, do this:
heroku domains:add www.mysite.com
heroku domains:wait 'www.mysite.com'
1) If you have hosting with HostGator
Log into your HostGator cpanel interface at mysite.com/cpanel. Scroll down to Domains and open up the Advanced Zone Editor (click the link). You're not going to add a record. Instead, you're going to change one that's already there. Find the record with the name "www.mysite.com." (it has a period at the end) with the type CNAME. Click Edit. Change the CNAME field to the DNS target heroku gives you when you type heroku domains or scroll down to Domains And Certificates under Settings in your Heroku dashboard. Mine looks like www.mysite.com.herokudns.com. Finalize the change.
Visit www.mysite.com. Please put www in the url. www must be in the url. This should now point to your Heroku site. Perhaps you will see a 400 (bad request) error. This might be because your backend isn't allowing Heroku as a host. If you have a Django app, for example, that's not in debug mode (you should set DEBUG to False for security reasons), you must also set the ALLOWED_HOSTS list in settings.py to include 'www.mysite.com'. Otherwise you'll get 400 errors when you try to access the site from the www.mysite.com domain.
The end result is that www.mysite.com points where you want it to, and so will www.mysite.com/some_page.
But what if a user types in only "mysite.com"? They'll be directed to your HostGator site. A simple solution is to go to the CPanel's Redirects section, also under Domains, and make a permanent redirect from your domain (leaving the textbox that starts with "/" blank) to http://(((www.mysite.com/))) [StackOverflow won't let me put it in without something like parentheses there.] All this does is force "www" to appear in the URL even when the user doesn't type it.
Now, whatever the user types in, they'll end up at your Heroku site. I don't mind having a "www" hanging out in the URL box, so this works for me.
2) If you don't have hosting with HostGator, just ditched it, or simply don't like the company (quite understandable)
If you don't have HostGator hosting or ditched it, you probably can't access the cpanel stuff. First, add the domain as shown at the top. Now install the PointDNS add-on for Heroku. It automatically syncs with your custom domains (even after you install it). So when you open up PointDNS in the Heroku dashboard, you'll see it set up with basically everything you need. In HostGator, at https://portal.hostgator.com/domain/manage), click on your domain name and find the link to change the nameservers. Select Manually set my nameservers, and replace the default nameservers with the nameservers you see labelled with NS on the main page of the PointDNS add-on page. (You're also free to add more or or change them in PointDNS.)
HostGator says it will take a couple days to propagate. I saw the change take effect within seconds.
If it doesn't work without www. now (check pages besides the index page), I've outlined a potential solution here.
With this PointDNS solution, you may want to test your site at different places in the world to make sure it's available there. I made sure mine is available from places where I expect people to view it, but it's also available in Beijing, so I don't think you'll have geographic limitations with PointDNS. I like to use www.webpagetest.org to test the site from different locations.
According to https://devcenter.heroku.com/articles/custom-domains you must add a CNAME record like "CNAME www example.herokuapp.com" first at Hostgator. After that, you must add www.example.com (with or without www) as a custom domain to your project. It's really simple.

Point www.domain.org to a specific Github project page?

I would like to point www.deeplearningbook.org directly to the Github project page goodfeli.github.io/book.
However, this github help page ( https://help.github.com/articles/about-custom-domains-for-github-pages-sites/#subdomains ) makes it sound like I could only have book.deeplearningbook.org or goodfeli.deeplearningbook.org/book point to goodfeli.github.io/book. Is there a way to do what I want?
You can configure a custom domain for User, Organization, and Project Pages.
An, yes the Github documentation is sometimes confusing.
In your case, you will point both deeplearningbook.org and www.deeplearningbook.org to goodfeli.github.io/book.
Go to your DNS provider and :
create two A records for your apex domain deeplearningbook.org pointing to 192.30.252.153 and 192.30.252.154 (documentation)
create a CNAME record for www.deeplearningbook.org pointing to goodfeli.github.io (documentation)
Go to your goodfeli.github.io/book Github repository an create a CNAME file at the root, containing deeplearningbook.org.
You then have to be patient. DNS replication can take up to 48 hours. Usually in one or two hours, you can reach your newly set domain.
I was eventually about to do this by adding A links to github.io rather than just the CNAME link. The full instructions are here: https://www.namecheap.com/support/knowledgebase/article.aspx/9645/2208/how-do-i-link-my-domain-to-github-pages

Is it possible to redirect a subdomain to a google drive folder with DNS records only?

I'm using github pages with a custom domain to publish my website, and I'm serving all images from my public google drive folder (because the images are licensed differently than the content served from my github repo).
Now I would like to assign a subdomain to the google drive folder: static.mydomain.com, but I don't have access to anything but the DNS settings for my own domain, mydomain.com (so no .htaccess or anything).
Is it possible to redirect the subdomain static.mydomain.com to my google drive folder, so that: static.mydomain.com/path/to/image.jpg -> points to http://googledrive.com/host/folder-id/path/to/image.jpg?
P.S.: Of course I would like to do all this without affecting the redirect that github pages requires for my custom domain. Although I don't think that will be an issue. But just as an aside.
It's no longer possible to do that; see https://stackoverflow.com/questions/13636286/using-a-custom-domain-for-google-drive-public-folder-website.