+++ title = "Auto TLS" description = "Automatic TLS (HTTPS) via Let’s Encrypt" [menu.main] name = "Auto TLS" parent = "cookbook" +++
For demo purpose, I will use domain test.lab.st that serves a simple
HTML page.
- Have a domain that resolves to an IP address via
AorCNAMEDNS record - [Install Armor]({{< ref "guide.md#installation">}})
- Copy config
config.yamlto/etc/armor - Copy
index.htmlto/var/www/test - Start Armor
armor -c /etc/armor/config.yaml - Browse to
http://test.lab.st, and in a few seconds TLS certificate will be installed automatically.
config.yaml
---
address: :80
tls:
address: :443
auto: true
plugins:
- name: https-redirect
hosts:
test.lab.st:
plugins:
- name: static
root: /var/www/testindex.html
<!doctype html>
<html lang="en-us">
<head>
<title>Armor</title>
</head>
<body>
<h1>Welcome to Armor!</h1>
</body>
</html>