TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: Scar – Static websites with HTTPS, a global CDN, and custom domains

363 pointsby cloudkjalmost 6 years ago

33 comments

fishtoasteralmost 6 years ago
Looks very similar to my project <a href="https:&#x2F;&#x2F;github.com&#x2F;kkuchta&#x2F;scarr" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;kkuchta&#x2F;scarr</a> from a while back. It even uses the same acronym (I assume that&#x27;s just a coincidence, since we both just picked a cool-sounding english-language word using the initials from S3, Cloudfront, ACM, and ACM.<p>At a glance: - Mine handles domain registration + ACM verification automatically - This one wisely uses clioudformation instead of api calls - This one does apex-&gt;ww redirects, whereas mine uses the apex and has no redirect<p>Seems pretty cool!
评论 #19985509 未加载
jadenalmost 6 years ago
GitHub pages [0] gives you static sites with HTTPS and a custom domain without nearly as much complexity as this if you&#x27;re looking for an alternative to Netlify.<p>[0] <a href="https:&#x2F;&#x2F;pages.github.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;pages.github.com&#x2F;</a>
评论 #19982683 未加载
评论 #19982584 未加载
评论 #19982353 未加载
评论 #19984823 未加载
NateEagalmost 6 years ago
Am I the only one who still hosts my own static sites on a plain old virtual machine?<p>It&#x27;s pretty simple to configure nginx for static sites, and by doing it yourself you reduce vendor lockin to just about nil.<p>Even if S3 is massively cheaper, $5&#x2F;month for a tiny VM seems like a small price to pay for being vendor-abstract.<p>I suppose S3 is way less likely to suffer a meaningful outage than my little VM, but how many 9s do my personal websites actually need?
评论 #19984018 未加载
评论 #19982978 未加载
评论 #19983160 未加载
评论 #19986782 未加载
评论 #19983058 未加载
评论 #19984133 未加载
评论 #19984083 未加载
评论 #19984901 未加载
评论 #19983016 未加载
评论 #19985408 未加载
评论 #19987372 未加载
评论 #19982967 未加载
gvandalmost 6 years ago
Nice project.<p>As an aside, I genuinely wonder under which circumstances a CDN will be useful for a static website nowadays. I have a static website that has been on the HN homepage a few times and got picked up by the Chrome mobile recommendations and a nginx&#x2F;https with slightly tweaked configuration never had a problem handling the traffic even on the smallest DO droplet.<p>Edit: Thanks for these replies.
评论 #19982222 未加载
评论 #19982305 未加载
评论 #19984648 未加载
rsweeney21almost 6 years ago
We use a combination of Netlify + Webflow + Hugo for our website (www.facetdev.com). With that we get a global CDN and our website will never go down.<p>Netlify has been awesome and it made it stupid easy to combine our www site on Webflow with a hugo static blog in a subfolder (&#x2F;blog). This might be my favorite web publishing workflow ever.<p>If you haven&#x27;t tried Netlify yet, definitely give it a look.
评论 #19984410 未加载
评论 #19986073 未加载
singingwolfboyalmost 6 years ago
I wrote a tutorial for how to do all this setup manually, if you prefer: <a href="https:&#x2F;&#x2F;www.davidbaumgold.com&#x2F;tutorials&#x2F;host-static-site-aws-s3-cloudfront&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.davidbaumgold.com&#x2F;tutorials&#x2F;host-static-site-aws...</a><p>Sometimes it’s nice to understand how all the pieces fit together, instead of using an automated system!
djsumdogalmost 6 years ago
How much does this cost? I put in some more effort to setup my HAProxy and nginx containers on a Vultr node, but I get LetsEncrypt for free, so I&#x27;m just paying for a Vultr node (or DO droplet) and the price of the domain name:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;sumdog&#x2F;bee2" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;sumdog&#x2F;bee2</a>
评论 #19982500 未加载
评论 #19983750 未加载
whalesaladalmost 6 years ago
I have a two-line Makefile that with one target that sync&#x27;s my website with an S3 bucket. Deploys are instant. The rest is handled by Cloudflare an AWS. The sheer number of moving parts in this system is outrageous for a static website. A fun project for sure, though.
评论 #19983876 未加载
kaikualmost 6 years ago
Bundling service config and launch makes the whole process easier, for sure. There&#x27;s also more than one way to configure this depending on what your needs are, so it&#x27;d be cool to have a few different versions of SCAR.<p>I started with a setup similar to your diagram and tweaked it when I realized S3 didn&#x27;t serve index.html when the URL was just the parent &quot;directory&quot;, i.e. example.com&#x2F;foo&#x2F; doesn&#x27;t resolve to s3:&#x2F;&#x2F;example.com&#x2F;foo&#x2F;index.html. To get this working I had to write a bit of JS in a Lambda function and deploy it at the edge of my CloudFront distribution to do some URL rewriting.<p>Given that&#x27;s the behavior most people expect, might be worth considering?
评论 #19982509 未加载
评论 #19983917 未加载
huphturalmost 6 years ago
Recently moved some static sites from S3 to AWS Amplify Console. Super easy setup and even easier maintenance with the Git-based workflow: <a href="https:&#x2F;&#x2F;aws.amazon.com&#x2F;amplify&#x2F;console&#x2F;" rel="nofollow">https:&#x2F;&#x2F;aws.amazon.com&#x2F;amplify&#x2F;console&#x2F;</a>
SadWebDeveloperalmost 6 years ago
Anyone have an a average monthly fee for using these as hosting solution? last time i ran the numbers using all that services go from 5 to 10 USD per month and was better to use amazon lightsail (3.5 per month) or other cheaper alternatives at lowendbox
iBelievealmost 6 years ago
For anyone looking for a hosted solution, <a href="https:&#x2F;&#x2F;surge.sh&#x2F;" rel="nofollow">https:&#x2F;&#x2F;surge.sh&#x2F;</a> is super nice and simple without any of the complexity of managing the stack yourself. Deploying uses one simple command, and you get hosting and custom domains for free, though I believe SSL is paid for custom domains. (I&#x27;m not affiliated with Surge at all, just a happy user.)
评论 #19984173 未加载
jarewarealmost 6 years ago
Same feature set - plus a few extras like Basic Auth support, custom headers, preventing direct access to the underlying S3 bucket - implemented as a reusable Terraform module: <a href="https:&#x2F;&#x2F;github.com&#x2F;futurice&#x2F;terraform-utils&#x2F;tree&#x2F;master&#x2F;aws_static_site" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;futurice&#x2F;terraform-utils&#x2F;tree&#x2F;master&#x2F;aws_...</a>
tamalsaha001almost 6 years ago
How is this any different from Firebase hosting? We have been using it for a while with no problem. Also comes with a very generous free tier.
timClicksalmost 6 years ago
Sorry to nitpick, but &quot;Copyright © 2019&quot; isn&#x27;t a &quot;license&quot;. It&#x27;s not even a full copyright declaration without listing an owner.
评论 #19984561 未加载
评论 #19984590 未加载
morenoh149almost 6 years ago
great job! I wish more projects have 1-click deploy to Heroku, aws, gcp or azure. This is a good habit more people should get into.<p>Running this project on aws can give a cloud beginner an interesting way to expose them to many concepts. Now I just have to figure out what static website I want to run in this!<p>Please do the same for running your own scalable wordpress install!
评论 #19984875 未加载
t0astbreadalmost 6 years ago
What benefit does this have over Netlify?
评论 #19984441 未加载
评论 #19982541 未加载
anvarikalmost 6 years ago
you lost me at GoDaddy
blairandersonalmost 6 years ago
TL;DR this is an AWS stack with <i>10 AWS services</i> required to build&#x2F;deploy a static site with HTTPS&#x2F;CDN<p>I will be staying with netlify
评论 #19982300 未加载
评论 #19982154 未加载
pier25almost 6 years ago
Off topic, but what did you use to draw the flow diagram?
评论 #19984025 未加载
bsingh4almost 6 years ago
You&#x27;ve only taken care of the surface-level complexity with AWS. Want to do something more like add a header to the response? Well then, create a lambda, deploy it to the edge, and pay per page view. This is something Firebase is much more elegant at - the initial deploy, and then evolution and addition of features geared to static site deployment.
myresumealmost 6 years ago
Try out <a href="https:&#x2F;&#x2F;freepage.io" rel="nofollow">https:&#x2F;&#x2F;freepage.io</a> is much easier to use than github pages. You don&#x27;t even have to create an account, verify email and all that nonsense to use it. And it has social media built in to get your page out there in to the world.
js2almost 6 years ago
The lambda stuff is there just to upload the welcome.html?<p>Also, maybe consider configuring a logs bucket for the cloudfront logs?
paulgbalmost 6 years ago
This is cool, I&#x27;m glad somebody built this! I love netlify but I worry about vendor lock-in.
评论 #19982515 未加载
评论 #19982093 未加载
评论 #19982402 未加载
评论 #19982709 未加载
srathialmost 6 years ago
How much should this cost per month in AWS billing for a small static website?
评论 #19985390 未加载
评论 #19985525 未加载
shapiro92almost 6 years ago
This is highly complex for no reason. GitHubPages, Netify provide you with easy to use custom static page hosting.<p>Your abstraction is nice, but the learning curve for someone is incredibly high for such a setup.
vijaybrittoalmost 6 years ago
This seems like a nightmare to setup and maintain for a new comer. Netlify lets us setup things in a whiff. This is a nice project but not for anyone below intermediate.
dlhavemaalmost 6 years ago
Yeah, super cool! Thanks, this was the only part I was unclear about in connecting the domain to the bucket easily..
adontzalmost 6 years ago
I did the same on azure a few days ago and it was much much easier.
faheelalmost 6 years ago
Just use Netlify.
评论 #19984939 未加载
ryanisnanalmost 6 years ago
Other than the notion that all traffic should be served over HTTPs, if you have purely static site, why the big fuss?
评论 #19982636 未加载
评论 #19982672 未加载
评论 #19982657 未加载
评论 #19982659 未加载
tempsolutionalmost 6 years ago
Ha I just did the exact same thing yesterday evening... Funny how stuff like this hits place one in HackerNews these days.
romanovcodealmost 6 years ago
How to host static website with HTTPS, a global CDN and custom domains for free:<p>1. Setup public repo with Hugo project<p>2. Add Travis CI integration with GH Pages<p>3. Use CloudFlare for free SSL + other goodies<p>Why would anyone need this?
评论 #19985246 未加载