跳到主要内容
版本:1.0.14

网络参数

listen_addresses

字符串类型。设置在哪些地址上进行监听。默认值 localhost,即只允许本地连接。建议修改为 * 以允许远程连接。该参数只能在实例启动时设置。

listen_addresses = '*'
# comma-separated list of addresses;
# defaults to 'localhost'; use '*' for all
# (change requires restart)

port

数值类型。监听端口。默认值 1921。该参数只能在实例启动时设置。

port = 1921

max_connections

数值类型。最大并发连接数。默认值 100,建议根据实际需要调大。该参数只能在实例启动时设置。

max_connections = 100 # (change requires restart)

superuser_reserved_connections

数值类型。为超级用户保留的连接数。默认值 3。该参数只能在实例启动时设置。

#superuser_reserved_connections = 3 # (change requires restart)

unix_socket_directories

字符串类型。Unix 域套接字目录。默认值 /var/run/halo。该参数只能在实例启动时设置。

unix_socket_directories = '/var/run/halo'
# (change requires restart)

tcp_keepalives_idle

数值类型。TCP 保活探测间隔,单位为秒。默认值 0,使用系统默认值。

#tcp_keepalives_idle = 0 # TCP_KEEPIDLE, in seconds;
# 0 selects the system default

tcp_keepalives_interval

数值类型。TCP 保活探测响应超时,单位为秒。默认值 0,使用系统默认值。

#tcp_keepalives_interval = 0 # TCP_KEEPINTVL, in seconds;
# 0 selects the system default

tcp_keepalives_count

数值类型。TCP 保活探测失败次数。默认值 0,使用系统默认值。

#tcp_keepalives_count = 0 # TCP_KEEPCNT;
# 0 selects the system default