move LE challenge root outside webroot
This commit is contained in:
		
							parent
							
								
									0313a5c8bf
								
							
						
					
					
						commit
						d2100c0ae0
					
				| @ -1,6 +1,6 @@ | |||||||
| FROM nginx:mainline-alpine | FROM nginx:mainline-alpine | ||||||
| 
 | 
 | ||||||
| # add fun error pages | # add fun error pages & LetsEncrypt challenge directory outside webroot | ||||||
| RUN apk --no-cache add git \ | RUN apk --no-cache add git \ | ||||||
|     && cd /usr/share/nginx/html \ |     && cd /usr/share/nginx/html \ | ||||||
|     && rm -rf * \ |     && rm -rf * \ | ||||||
| @ -8,7 +8,8 @@ RUN apk --no-cache add git \ | |||||||
|     && apk del git \ |     && apk del git \ | ||||||
|     && mv /tmp/errorpages/ ./ \ |     && mv /tmp/errorpages/ ./ \ | ||||||
|     && rm -rf /tmp/* \ |     && rm -rf /tmp/* \ | ||||||
|     && rm -rf /tmp/.git* |     && rm -rf /tmp/.git* \ | ||||||
|  |     && mkdir /LEchallenge | ||||||
| 
 | 
 | ||||||
| # standardized labels | # standardized labels | ||||||
| LABEL maintainer="Asif Bacchus <asif@bacchus.cloud>" | LABEL maintainer="Asif Bacchus <asif@bacchus.cloud>" | ||||||
|  | |||||||
| @ -15,7 +15,7 @@ server { | |||||||
|         error_log /var/log/nginx/LetsEncrypt_error.log warn; |         error_log /var/log/nginx/LetsEncrypt_error.log warn; | ||||||
| 
 | 
 | ||||||
|         default_type text/plain; |         default_type text/plain; | ||||||
|         root /usr/share/nginx/html/letsencrypt; |         root /LEChallenge; | ||||||
|         autoindex on; |         autoindex on; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -16,7 +16,7 @@ server { | |||||||
|         error_log /var/log/nginx/LetsEncrypt_error.log warn; |         error_log /var/log/nginx/LetsEncrypt_error.log warn; | ||||||
| 
 | 
 | ||||||
|         default_type text/plain; |         default_type text/plain; | ||||||
|         root /usr/share/nginx/html/letsencrypt; |         root /LEChallenge; | ||||||
|         autoindex on; |         autoindex on; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user