![](/img/trans.png)
[英]Run Mercure on production with Symfony and Apache | HTTPS problem
[英]apiplatform mercure start not work : https://caddy "SSL certificate problem"
無法開始使用水星和 apiplatform3。 但是,我的配置是基本的。 (wsl2/debian)我保留了基本配置才能啟動。
#api/.env
MERCURE_JWT_SECRET="WExxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxN6P"
#api/config/packages/mercures.yaml
mercure:
enable_profiler: '%kernel.debug%'
hubs:
default:
url: '%env(MERCURE_URL)%'
public_url: '%env(MERCURE_PUBLIC_URL)%'
jwt:
secret: '%env(MERCURE_JWT_SECRET)%'
publish: '*'
#[Route('/mercure/test', name: 'mercure', methods: ['GET'])]
public function mercure(HubInterface $hub): Response
{
$hub->publish(new Update("https://xxxxxxxxxxxxx.fr/mercure/test",
json_encode(['status' => 'OutOfStock'])
));
return new Response('published!');
}
我收到一個錯誤:失敗:SSL 證書問題:無法獲取“https://caddy/.well-known/mercure/.well-known/mercure”的本地頒發者證書
添加:
framework:
http_client:
default_options:
verify_peer: false
verify_host: false
改變:!!!!!!! :
MERCURE_URL=http://caddy/.well-known/mercure
MERCURE_URL=https://caddy/.well-known/mercure
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.