找回密码
 注册
查看: 3053|回复: 1

RTMP的NGINX配置启动失败

[复制链接]
发表于 2022-1-29 10:00:55 | 显示全部楼层 |阅读模式

RTMP的moudle已经安装好了,然后新建了一个虚拟主机。在vhost里修改了conf,然后重启nginx,报错Starting nginx... nginx: [emerg] "rtmp" directive is not allowed

直接写在nginx.conf里也是报错Starting nginx... nginx: [emerg] "rtmp" directive is not allowed
是服务器做了HTTP服务,就不能做RTMP服务了?
rtmp的配置该写在哪里啊?
美国VPS推荐: 遨游主机、Linode、LOCVPS、主机云、搬瓦工、80VPS、Vultr等美国VPS主机。中国VPS推荐: 阿里云、腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2022-1-29 16:58:20 | 显示全部楼层


已经提示你了"rtmp" directive is not allowed,肯定是位置rtmp整个block放错位置了
rtmp整个block是和http的block是平行的
具体可以看rtmp模块提供的配置例子:https://github.com/arut/nginx-rtmp-module
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2026-11-26 23:29 , Processed in 0.008908 second(s), 17 queries .

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表