我正在尝试用tiangolo/nginx-rtmp设置RTMP服务器,但当我尝试运行docker-compose up时,它似乎给了我以下错误:
Attaching to rtmp_server
rtmp_server | 2021/08/29 22:25:57 [emerg] 1#1: directive "events" has no opening "{" in /etc/nginx/nginx.conf:5
rtmp_server | nginx: [emerg] directive "events" has no opening "{" in /etc/nginx/nginx.conf:5
rtmp_server exited with code 1理论上,它应该是nginx.conf上第5行缺少的{,但我的nginx.conf看起来是这样的:
worker_processes auto;
rtmp_auto_push on;
events{} # Tried events { }, events{ } but none seem to work
rtmp {
server {
listen 1935;
listen [::]:1935 ipv6only=on;
application live {
live on;
record off;
}
}
}运行nginx -t返回:
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful发布于 2021-09-07 03:32:33
由于某些原因,docker-compose构建没有完成,也没有给我任何错误,因此它正在更新我的更改。重新启动后,它工作正常。
https://stackoverflow.com/questions/68977427
复制相似问题