{
	pki {
		ca custom-ca {
			name "Custom CA"
		}
	}
}

acme.example.com {
	acme_server {
		ca custom-ca
		allow {
			domains host-1.internal.example.com host-2.internal.example.com
		}
		deny {
			domains dc.internal.example.com
		}
	}
}
----------
{
	"apps": {
		"http": {
			"servers": {
				"srv0": {
					"listen": [
						":443"
					],
					"routes": [
						{
							"match": [
								{
									"host": [
										"acme.example.com"
									]
								}
							],
							"handle": [
								{
									"handler": "subroute",
									"routes": [
										{
											"handle": [
												{
													"ca": "custom-ca",
													"handler": "acme_server",
													"policy": {
														"allow": {
															"domains": [
																"host-1.internal.example.com",
																"host-2.internal.example.com"
															]
														},
														"deny": {
															"domains": [
																"dc.internal.example.com"
															]
														}
													}
												}
											]
										}
									]
								}
							],
							"terminal": true
						}
					]
				}
			}
		},
		"pki": {
			"certificate_authorities": {
				"custom-ca": {
					"name": "Custom CA"
				}
			}
		}
	}
}
