grafana use vhost from documentation
This commit is contained in:
		
							parent
							
								
									824b10546d
								
							
						
					
					
						commit
						b27f07a867
					
				
					 2 changed files with 29 additions and 4 deletions
				
			
		|  | @ -129,10 +129,7 @@ def nginx(metadata): | |||
|         'nginx': { | ||||
|             'vhosts': { | ||||
|                 metadata.get('grafana/hostname'): { | ||||
|                     'content': 'nginx/proxy_pass.conf', | ||||
|                     'context': { | ||||
|                         'target': 'http://127.0.0.1:8300', | ||||
|                     } | ||||
|                     'content': 'grafana/vhost.conf', | ||||
|                 }, | ||||
|             }, | ||||
|         }, | ||||
|  |  | |||
							
								
								
									
										28
									
								
								data/grafana/vhost.conf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								data/grafana/vhost.conf
									
									
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,28 @@ | |||
| map $http_upgrade $connection_upgrade { | ||||
|   default upgrade; | ||||
|   '' close; | ||||
| } | ||||
| 
 | ||||
| server { | ||||
|   listen 443 ssl http2; | ||||
|   listen [::]:443 ssl http2; | ||||
|   server_name ${server_name}; | ||||
|    | ||||
|   ssl_certificate /var/lib/dehydrated/certs/${server_name}/fullchain.pem; | ||||
|   ssl_certificate_key /var/lib/dehydrated/certs/${server_name}/privkey.pem; | ||||
| 
 | ||||
|   location / { | ||||
|     proxy_set_header Host $http_host; | ||||
|     proxy_pass http://127.0.0.1:8300/; | ||||
|   } | ||||
| 
 | ||||
|   # Proxy Grafana Live WebSocket connections. | ||||
|   location /api/live { | ||||
|     rewrite  ^/(.*)  /$1 break; | ||||
|     proxy_http_version 1.1; | ||||
|     proxy_set_header Upgrade $http_upgrade; | ||||
|     proxy_set_header Connection $connection_upgrade; | ||||
|     proxy_set_header Host $http_host; | ||||
|     proxy_pass http://127.0.0.1:8300/; | ||||
|   } | ||||
| } | ||||
		Loading…
	
		Reference in a new issue
	
	 mwiegand
						mwiegand