mirror of
				https://github.com/kevinveenbirkenbach/computer-playbook.git
				synced 2025-10-31 02:10:05 +00:00 
			
		
		
		
	Refactored server roles for better readability
This commit is contained in:
		
							
								
								
									
										16
									
								
								roles/sys-svc-letsencrypt/templates/letsencrypt.conf.j2
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								roles/sys-svc-letsencrypt/templates/letsencrypt.conf.j2
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,16 @@ | ||||
| server | ||||
| { | ||||
|   listen 80; | ||||
|   listen [::]:80; | ||||
|   location / | ||||
|   { | ||||
|     return 301 https://$host$request_uri; | ||||
|   } | ||||
|   #letsencrypt | ||||
|   location ^~ /.well-known/acme-challenge/ { | ||||
|     allow all; | ||||
|     root {{ LETSENCRYPT_WEBROOT_PATH }}; | ||||
|     default_type "text/plain"; | ||||
|     try_files $uri =404; | ||||
|   } | ||||
| } | ||||
							
								
								
									
										3
									
								
								roles/sys-svc-letsencrypt/templates/ssl_credentials.j2
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								roles/sys-svc-letsencrypt/templates/ssl_credentials.j2
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,3 @@ | ||||
| ssl_certificate         {{ [ LETSENCRYPT_LIVE_PATH, ssl_cert_folder, 'fullchain.pem'] | path_join }}; | ||||
| ssl_certificate_key     {{ [ LETSENCRYPT_LIVE_PATH, ssl_cert_folder, 'privkey.pem'  ] | path_join }}; | ||||
| ssl_trusted_certificate {{ [ LETSENCRYPT_LIVE_PATH, ssl_cert_folder, 'chain.pem'    ] | path_join }}; | ||||
							
								
								
									
										15
									
								
								roles/sys-svc-letsencrypt/templates/ssl_header.j2
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								roles/sys-svc-letsencrypt/templates/ssl_header.j2
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,15 @@ | ||||
| listen {{ WEB_PORT }} ssl http2; | ||||
| listen [::]:{{ WEB_PORT }} ssl http2; | ||||
|  | ||||
| ssl_protocols TLSv1.2 TLSv1.3; | ||||
| ssl_ecdh_curve X25519:P-256; | ||||
| ssl_prefer_server_ciphers on; | ||||
| ssl_ciphers 'ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384'; | ||||
|  | ||||
| ssl_session_timeout 1d; | ||||
| ssl_session_cache shared:SSL:50m; | ||||
| ssl_session_tickets on; | ||||
| add_header Strict-Transport-Security max-age=15768000; | ||||
| ssl_stapling on; | ||||
| ssl_stapling_verify on; | ||||
| {% include 'roles/sys-svc-letsencrypt/templates/ssl_credentials.j2' %} | ||||
		Reference in New Issue
	
	Block a user