webman部署能使用.sock的文件么?

sparks

问题描述

webman部署网站,想使用.sock文件,主要是一台服务器上部署多套,使用端口会有点麻烦,所以想使用.sock文件。

return [
    'listen' => 'unix://xxxx.sock',
    'transport' => 'tcp',
    'context' => [],
    'name' => 'webman',
    'count' => cpu_count() * 2,
    'user' => '',
    'group' => '',
    'reusePort' => false,
    'event_loop' => '',
    'stop_timeout' => 2,
    'pid_file' => runtime_path() . '/webman.pid',
    'status_file' => runtime_path() . '/webman.status',
    'stdout_file' => runtime_path() . '/logs/stdout.log',
    'log_file' => runtime_path() . '/logs/workerman.log',
    'max_package_size' => 10 * 1024 * 1024
];
988 1 1
1个回答

walkor 打赏
return [
    'listen' => 'unix:///xxxx.sock',                 // 注意unix:后有三个斜线 unix:///
    'protocol' => Workerman\Protocols\Http::class,   // 注意加一行这个配置
    'transport' => 'tcp',
    'context' => [],
    'name' => 'webman',
    'count' => cpu_count() * 2,
    'user' => '',
    'group' => '',
    'reusePort' => false,
    'event_loop' => '',
    'stop_timeout' => 2,
    'pid_file' => runtime_path() . '/webman.pid',
    'status_file' => runtime_path() . '/webman.status',
    'stdout_file' => runtime_path() . '/logs/stdout.log',
    'log_file' => runtime_path() . '/logs/workerman.log',
    'max_package_size' => 10 * 1024 * 1024
];

参考上面配置设置unixsocket

年代过于久远,无法发表回答
×
🔝