Add nginx ESPHome config
This commit is contained in:
		
					parent
					
						
							
								658058ce99
							
						
					
				
			
			
				commit
				
					
						7a869f6330
					
				
			
		
					 1 changed files with 24 additions and 7 deletions
				
			
		|  | @ -1,8 +1,25 @@ | |||
| server { | ||||
| 	listen 80; | ||||
| 	server_name esphome.z9; | ||||
| 
 | ||||
| 	location / { | ||||
| 		proxy_pass http://localhost:6052; | ||||
| 	} | ||||
| map $http_upgrade $connection_upgrade { | ||||
|     default upgrade; | ||||
|     '' close; | ||||
| } | ||||
| 
 | ||||
| server { | ||||
|     listen 443 ssl http2; | ||||
|     listen [::]:443 ssl http2; | ||||
| 
 | ||||
|     ssl_certificate /etc/ssl/certs/ssl-cert-snakeoil.pem; | ||||
|     ssl_certificate_key /etc/ssl/private/ssl-cert-snakeoil.key; | ||||
| 
 | ||||
|     server_name esphome.z9; | ||||
| 
 | ||||
|     location / { | ||||
|         proxy_set_header Host $host; | ||||
|         proxy_redirect http:// https://; | ||||
|         proxy_http_version 1.1; | ||||
|         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||||
|         proxy_set_header X-Real-IP $remote_addr; | ||||
|         proxy_set_header Upgrade $http_upgrade; | ||||
|         proxy_set_header Connection $connection_upgrade; | ||||
|         proxy_pass http://localhost:6052; | ||||
|     } | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue