24 lines
		
	
	
		
			541 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
		
			541 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| 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 -%>
 | |
| }
 |