Closed1

FrankenPHPのCaddyfileで使えるやつ

黒ヰ樹黒ヰ樹

FrankenPHPではPHPの機能以外にMercureやVulcainの機能も使えるのでまとめた。

$ frankenphp version
FrankenPHP v1.2.5 PHP 8.3.11 Caddy v2.8.4 h1:q3pe0wpBj1OcHFZ3n/1nl4V4bxBrYoSoab7rL9BMYNk=
$ frankenphp list-modules
...

  Standard modules: 121

frankenphp
http.encoders.br
http.handlers.mercure
http.handlers.php
http.handlers.vulcain

  Non-standard modules: 5

  Unknown modules: 0

https://github.com/dunglas/frankenphp
https://caddyserver.com/docs/modules/frankenphp
https://frankenphp.dev/docs/config/
https://github.com/dunglas/frankenphp/blob/main/caddy/frankenphp/Caddyfile

{
	"num_threads": 0,
	"workers": [{
		"file_name": "",
		"num": 0,
		"env": {
			"": ""
		}
	}]
}

https://github.com/dunglas/caddy-cbrotli
https://caddyserver.com/docs/modules/http.encoders.br
https://github.com/dunglas/caddy-cbrotli/blob/main/Caddyfile

{
	"quality": 0,
	"lgwin": 0
}

https://github.com/dunglas/mercure
https://caddyserver.com/docs/modules/http.handlers.mercure
https://mercure.rocks/docs/hub/config
https://github.com/dunglas/mercure/blob/main/Caddyfile

{
	"anonymous": false,
	"subscriptions": false,
	"demo": false,
	"ui": false,
	"write_timeout": 0,
	"dispatch_timeout": 0,
	"heartbeat": 0,
	"publisher_jwt": {
		"key": "",
		"alg": ""
	},
	"subscriber_jwt": {
		"key": "",
		"alg": ""
	},
	"publish_origins": [""],
	"cors_origins": [""],
	"transport_url": "",
	"lru_shard_size": 0,
	"cookie_name": "",
	"protocol_version_compatibility": 0
}

https://github.com/dunglas/frankenphp
https://caddyserver.com/docs/modules/http.handlers.php
https://frankenphp.dev/docs/config/

caddy/frankenphp/CaddyfileにSyntaxなかったのでおそらくphp_fastcgiからPickしている?
掘っていくとroot directiveやfile_server directiveあたりに辿り着くので割愛。

https://caddyserver.com/docs/caddyfile/directives/php_fastcgi

{
	"root": "",
	"split_path": [""],
	"resolve_root_symlink": false,
	"env": {
		"": ""
	}
}

https://github.com/dunglas/vulcain
https://caddyserver.com/docs/modules/http.handlers.vulcain
https://vulcain.rocks/docs/gateway/caddy
https://github.com/dunglas/vulcain/blob/main/Caddyfile

{
	"openapi_file": "",
	"max_pushes": 0,
	"early_hints": false
}
このスクラップは1ヶ月前にクローズされました