Create a nginx_certbot_site resource to remove duplication
It creates a folder, the nginx vhost for certbot and HTTP redirects, and also runs certbot and recreates the nginx vhost that includes the TLS cert
This commit is contained in:
@@ -3,18 +3,6 @@ map $http_upgrade $connection_upgrade {
|
||||
'' close;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name <%= @server_name %>;
|
||||
|
||||
access_log "/var/log/nginx/mastodon.access.log";
|
||||
error_log "/var/log/nginx/mastodon.error.log";
|
||||
|
||||
location /.well-known { root "/var/www/mastodon"; }
|
||||
location / { return 301 https://$host$request_uri; }
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
|
||||
Reference in New Issue
Block a user