From 67ca246f8d6f183daf5d00c13dba98772e78277c Mon Sep 17 00:00:00 2001 From: Christine Dodrill Date: Wed, 17 Apr 2019 04:02:38 +0000 Subject: [PATCH] blog/site-to-site-wireguard-part-4: typo fixes --- ...-site-wireguard-part-4-2019-04-19.markdown | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/blog/site-to-site-wireguard-part-4-2019-04-19.markdown b/blog/site-to-site-wireguard-part-4-2019-04-19.markdown index 2ef76da..6600e99 100644 --- a/blog/site-to-site-wireguard-part-4-2019-04-19.markdown +++ b/blog/site-to-site-wireguard-part-4-2019-04-19.markdown @@ -18,27 +18,26 @@ This is the fourth post in my Site to Site WireGuard VPN series. You can read th In this article, we are going to install [Caddy](https://caddyserver.com) and set up the following: - A plaintext markdown site to demonstrate the process -- A URL shortener at https://g.o/ +- A URL shortener at https://g.o/ (with DNS and TLS certificates too) ## HTTPS and Caddy [Caddy](https://caddyserver.com) is a general-purpose HTTP server. One of its main features is automatic [Let's Encrypt](https://letsencrypt.org) support. We are using it here to serve HTTPS because it has a very, very simple configuration file format. -Caddy doesn't have a stable package in Ubuntu yet, but it is fairly simple to do it by hand. +Caddy doesn't have a stable package in Ubuntu yet, but it is fairly simple to install it by hand. -### Installing Caddy +## Installing Caddy One of the first things you should do when installing Caddy is picking the list of extra plugins you want in addition to the core ones. I generally suggest the following plugins: -- http.cors - [Cross-Origin Resource Sharing](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS), because we can't trust browsers -- http.git - it facilitates automatic deployment -- http.supervisor - run background processes -- tls.dns.yourprovider - enables Let's Encrypt via DNS (in my case tls.dns.cloudflare) +- [`http.cors`](https://caddyserver.com/docs/http.cors) - [Cross-Origin Resource Sharing](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS), because we can't trust browsers +- [`http.git`](https://caddyserver.com/docs/http.git) - it facilitates automatic deployment +- [`http.supervisor`](https://caddyserver.com/docs/http.supervisor) - run background processes First we are going to need to download Caddy (please do this as root): ```console -curl https://getcaddy.com | bash -s personal http.cors,http.git,http.supervisor,tls.dns.cloudflare +curl https://getcaddy.com | bash -s personal http.cors,http.git,http.supervisor chown root:root /usr/local/bin/caddy chmod 755 /usr/local/bin/caddy ``` @@ -315,6 +314,15 @@ systemctl status caddy And open [https://g.o](https://g.o) on your iOS device: + + ![An image of the URL shortener in action](/static/img/site-to-site-part-4-gdoto.jpg) You can use the other [directives](https://caddyserver.com/docs) in the Caddy documentation to do more elaborate things. [When Then Zen](https://when-then-zen.christine.website) is hosted completely with [Caddy using the markdown directive](https://github.com/Xe/when-then-zen/blob/master/Caddyfile); but even this is ultimately a simple configuration.