Closed1
FrankenPHPのCaddyfileで使えるやつ

FrankenPHPではPHPの機能以外にMercureやVulcainの機能も使えるのでまとめました。
$ frankenphp version
FrankenPHP v1.5.0 PHP 8.4.5 Caddy v2.9.1 h1:OEYiZ7DbCzAWVb6TNEkjRcSCRGHVoZsJinoDR/n9oaY=
$ frankenphp list-modules
...
Standard modules: 124
admin.api.frankenphp
frankenphp
http.encoders.br
http.handlers.mercure
http.handlers.mercure.bolt
http.handlers.mercure.local
http.handlers.php
http.handlers.vulcain
Non-standard modules: 8
Unknown modules: 0
frankenphp
{
"num_threads": 0,
"max_threads": 0,
"workers": [{
"name": "",
"file_name": "",
"num": 0,
"env": {
"": ""
},
"watch": [""]
}],
"php_ini": {
"": ""
},
"max_wait_time": 0
}
http.handlers.php
{
"root": "",
"split_path": [""],
"resolve_root_symlink": false,
"env": {
"": ""
}
}
http.handlers.php_server
{
"root": "",
"split": [""],
"index": "",
"try_files": [""],
"split_path": [""],
"resolve_root_symlink": false,
"env": {
"": ""
},
"file_server": ""
}
php_serverディレクティブはphpディレクティブとfile_serverディレクティブで色々設定し、php_fastcgiディレクティブのように使用できるようにしたものです。
php_serverディレクティブを使用するのが一般的ですが、完全に制御したい場合は、より低レベルのphpディレクティブを使用します。
http.handlers.mercure
{
"anonymous": false,
"subscriptions": false,
"demo": false,
"ui": false,
"write_timeout": 0,
"dispatch_timeout": 0,
"heartbeat": 0,
"publisher_jwt": {
"key": "",
"alg": ""
},
"publisher_jwks_url": "",
"subscriber_jwt": {
"key": "",
"alg": ""
},
"subscriber_jwks_url": "",
"publish_origins": [""],
"cors_origins": [""],
"transport_url": "",
"lru_shard_size": 0,
"cookie_name": "",
"protocol_version_compatibility": 0,
"transport": ""
}
http.handlers.mercure.bolt
{
"path": "",
"bucket_name": "",
"size": 0,
"cleanup_frequency": 0
}
http.handlers.vulcain
{
"openapi_file": "",
"max_pushes": 0,
"early_hints": false
}
http.encoders.br
{
"quality": 0,
"lgwin": 0
}
このスクラップは5ヶ月前にクローズされました