added LE processing, updated error pages
This commit is contained in:
		
							parent
							
								
									88663dd4bb
								
							
						
					
					
						commit
						8b5f923949
					
				| @ -12,4 +12,17 @@ server { | ||||
| 
 | ||||
|     # redirect to properly formed HTTPS request | ||||
|     return 301 https://$host$request_uri; | ||||
| 
 | ||||
|     # error pages | ||||
|     error_page 404 /404.html; | ||||
|     location = /404.html { | ||||
|         root /usr/share/nginx/html; | ||||
|         internal; | ||||
|     } | ||||
| 
 | ||||
|     error_page 500 502 503 504 /50x.html; | ||||
|     location = /50x.html { | ||||
|         root /usr/share/nginx/html; | ||||
|         internal; | ||||
|     } | ||||
| } | ||||
|  | ||||
							
								
								
									
										42
									
								
								availableSites/redirectHTTPS_LE.conf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										42
									
								
								availableSites/redirectHTTPS_LE.conf
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,42 @@ | ||||
| ####### | ||||
| ### NGINX server configuration | ||||
| ### Redirect to secure connection | ||||
| ### Process LetsEncrypt verification requests | ||||
| ####### | ||||
| 
 | ||||
| server { | ||||
|     listen 80; | ||||
|     listen [::]:80; | ||||
| 
 | ||||
|     # specify server name(s) | ||||
|     include /etc/nginx/snippets/server_names.conf; | ||||
| 
 | ||||
|     # redirect to properly formed HTTPS request | ||||
|     location / { | ||||
|         return 301 https://$host$request_uri; | ||||
|     } | ||||
| 
 | ||||
|     # process LetsEncrypt requests | ||||
|     location ^~ /.well-known/acme-challenge { | ||||
|         # log requests to review issued certs or for security auditing | ||||
|         access_log /var/log/nginx/LetsEncrypt_access.log main; | ||||
|         error_log /var/log/nginx/LetsEncrypt_error.log warn; | ||||
| 
 | ||||
|         default_type text/plain; | ||||
|         root /usr/share/nginx/html/letsencrypt; | ||||
|         autoindex on; | ||||
|     } | ||||
| 
 | ||||
|     # error pages | ||||
|     error_page 404 /404.html; | ||||
|     location = /404.html { | ||||
|         root /usr/share/nginx/html; | ||||
|         internal; | ||||
|     } | ||||
| 
 | ||||
|     error_page 500 502 503 504 /50x.html; | ||||
|     location = /50x.html { | ||||
|         root /usr/share/nginx/html; | ||||
|         internal; | ||||
|     } | ||||
| } | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user