mirror of
				https://github.com/caddyserver/caddy.git
				synced 2025-11-03 19:17:29 -05:00 
			
		
		
		
	
		
			
				
	
	
		
			114 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			114 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
whoami.example.com {
 | 
						|
	reverse_proxy whoami
 | 
						|
}
 | 
						|
 | 
						|
app.example.com {
 | 
						|
	reverse_proxy app:80
 | 
						|
}
 | 
						|
unix.example.com {
 | 
						|
	reverse_proxy unix//path/to/socket
 | 
						|
}
 | 
						|
----------
 | 
						|
{
 | 
						|
	"apps": {
 | 
						|
		"http": {
 | 
						|
			"servers": {
 | 
						|
				"srv0": {
 | 
						|
					"listen": [
 | 
						|
						":443"
 | 
						|
					],
 | 
						|
					"routes": [
 | 
						|
						{
 | 
						|
							"match": [
 | 
						|
								{
 | 
						|
									"host": [
 | 
						|
										"whoami.example.com"
 | 
						|
									]
 | 
						|
								}
 | 
						|
							],
 | 
						|
							"handle": [
 | 
						|
								{
 | 
						|
									"handler": "subroute",
 | 
						|
									"routes": [
 | 
						|
										{
 | 
						|
											"handle": [
 | 
						|
												{
 | 
						|
													"handler": "reverse_proxy",
 | 
						|
													"upstreams": [
 | 
						|
														{
 | 
						|
															"dial": "whoami:80"
 | 
						|
														}
 | 
						|
													]
 | 
						|
												}
 | 
						|
											]
 | 
						|
										}
 | 
						|
									]
 | 
						|
								}
 | 
						|
							],
 | 
						|
							"terminal": true
 | 
						|
						},
 | 
						|
						{
 | 
						|
							"match": [
 | 
						|
								{
 | 
						|
									"host": [
 | 
						|
										"unix.example.com"
 | 
						|
									]
 | 
						|
								}
 | 
						|
							],
 | 
						|
							"handle": [
 | 
						|
								{
 | 
						|
									"handler": "subroute",
 | 
						|
									"routes": [
 | 
						|
										{
 | 
						|
											"handle": [
 | 
						|
												{
 | 
						|
													"handler": "reverse_proxy",
 | 
						|
													"upstreams": [
 | 
						|
														{
 | 
						|
															"dial": "unix//path/to/socket"
 | 
						|
														}
 | 
						|
													]
 | 
						|
												}
 | 
						|
											]
 | 
						|
										}
 | 
						|
									]
 | 
						|
								}
 | 
						|
							],
 | 
						|
							"terminal": true
 | 
						|
						},
 | 
						|
						{
 | 
						|
							"match": [
 | 
						|
								{
 | 
						|
									"host": [
 | 
						|
										"app.example.com"
 | 
						|
									]
 | 
						|
								}
 | 
						|
							],
 | 
						|
							"handle": [
 | 
						|
								{
 | 
						|
									"handler": "subroute",
 | 
						|
									"routes": [
 | 
						|
										{
 | 
						|
											"handle": [
 | 
						|
												{
 | 
						|
													"handler": "reverse_proxy",
 | 
						|
													"upstreams": [
 | 
						|
														{
 | 
						|
															"dial": "app:80"
 | 
						|
														}
 | 
						|
													]
 | 
						|
												}
 | 
						|
											]
 | 
						|
										}
 | 
						|
									]
 | 
						|
								}
 | 
						|
							],
 | 
						|
							"terminal": true
 | 
						|
						}
 | 
						|
					]
 | 
						|
				}
 | 
						|
			}
 | 
						|
		}
 | 
						|
	}
 | 
						|
}
 |