我正在尝试使用 WSS 访问。在 .env 文件中设置证书和私钥文件路径。但低于错误
UnexpectedValueException {#1506
#message: "Unable to complete TLS handshake: Unable to set private key file `/var/www/html/storage/ssl/private.key'"
#code: 0
#file: "./vendor/react/socket/src/StreamEncryption.php"
#line: 133
trace: {
./vendor/react/socket/src/StreamEncryption.php:133 { …}
./vendor/react/socket/src/StreamEncryption.php:76 { …}
./vendor/react/event-loop/src/StreamSelectLoop.php:245 { …}
./vendor/react/event-loop/src/StreamSelectLoop.php:212 { …}
./vendor/cboden/ratchet/src/Ratchet/Server/IoServer.php:74 { …}
./vendor/beyondcode/laravel-websockets/src/Console/StartWebSocketServer.php:155 { …}
./vendor/beyondcode/laravel-websockets/src/Console/StartWebSocketServer.php:52 { …}
./vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:36 { …}
./vendor/laravel/framework/src/Illuminate/Container/Util.php:40 { …}
./vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:93 { …}
./vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:37 { …}
./vendor/laravel/framework/src/Illuminate/Container/Container.php:596 { …}
./vendor/laravel/framework/src/Illuminate/Console/Command.php:136 { …}
./vendor/symfony/console/Command/Command.php:258 { …}
./vendor/laravel/framework/src/Illuminate/Console/Command.php:121 { …}
./vendor/symfony/console/Application.php:920 { …}
./vendor/symfony/console/Application.php:266 { …}
./vendor/symfony/console/Application.php:142 { …}
./vendor/laravel/framework/src/Illuminate/Console/Application.php:93 { …}
./vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:129 { …}
./artisan:37 {
› $input = new Symfony\Component\Console\Input\ArgvInput,
› new Symfony\Component\Console\Output\ConsoleOutput
› );
arguments: {
$input: Symfony\Component\Console\Input\ArgvInput {#27 …}
$output: Symfony\Component\Console\Output\ConsoleOutput {#25 …}
}
}
}
}
我们已经添加了具有正确权限的私钥路径,但是当 Web 套接字客户端尝试连接到 Web 套接字服务器时,它仍然会显示这一点。