Set up certbot to get a Let's Encrypt certificate for xmpp.5apps.com

This commit is contained in:
Greg Karékinian
2017-03-19 20:17:51 +00:00
parent 3f15330b00
commit 5b0658eb4b
3 changed files with 70 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
server {
listen 80; # For Let's Encrypt
<% if File.exist?(@ssl_cert) && File.exist?(@ssl_key) -%>
listen 443 ssl spdy;
<% end -%>
server_name <%= @server_name %>;
# Used by Let's Encrypt (certbot in webroot mode)
location /.well-known {
root "<%= @root_directory %>";
}
location / {
return 200 'Nothing to see here';
add_header Content-Type text/plain;
}
<% if File.exist?(@ssl_cert) && File.exist?(@ssl_key) -%>
ssl_certificate <%= @ssl_cert %>;
ssl_certificate_key <%= @ssl_key %>;
<% end -%>
}