Hugo set up ssl

Hello, i’m new in the Hugo joint. I’ve just bought a domain, an SSL certificate and i’ve decided that i want to use Hugo on my server. The problem is i have no idea on how make hugo server use the ssl certificate as i do not intend of serving my web pages using apache/nginx.

Hugo server doesn’t support the SSL serving natively yet. I would use Nginx. Alternatively you can use cloud front to serve the site and the SSL.

Steve Francia
spf13.com
@spf13

Is this still fact that Hugo does not support SSL serving natively yet? I started with hugo yesterday and planing to switch my current blog from wordpress to hugo. I run my blog secured by a letsencrypt ssl cert. I want to keep the hosting as easy as possible. so it would be nice to run the hugo webserver over ssl without an apache or nginx server in front. are there news about this or is there a plan when hugo will support ssl serving natively?

I really love the fast and easy system behind hugo so I hope there will be a possiblity to switch my wordpress blog to hugo.

No news, no plans.

That issue is about the BaseURL and just the BaseURL. Not about SSL in the server.

Hugo is primarily a static site generator, The server bundled with it shouldn’t be run in production. You could just setup an nginx server to serve the static files emitted by Hugo with an SSL certificate.

Agree. You’re barking up the wrong tree to expect Hugo’s lightweight server to do everything an Apache or nginx server would do, imo. Definitely use it for dev on your desktop, but publish to a full server.

Checkout Caddy. It already supports Hugo and LetsEncrypt.

https://caddyserver.com/

Hugo integration:
https://caddyserver.com/docs/hugo

Let’s Encrypt integration:
https://caddyserver.com/docs/automatic-https

I’m planning on switching over my sites to it soon (from nginx).

1 Like

If you want to host your static site on Amazon Web Services, here is a nice article explaining the different steps:

https://bryce.fisher-fleig.org/blog/setting-up-ssl-on-aws-cloudfront-and-s3/

I followed this article for my blog and automated these steps via Wercker, a hosted Continuous Integration service. You can see the source setup here:

Ringo