Sample Header Ad - 728x90

NGINX RTMP not working with sites-enabled directory set

2 votes
1 answer
3046 views
I'm having problems getting NGINX with the RTMP module to start when the RTMP server block is used within a file inside the sites-available (symbolic linked to sites-enabled). NGINX configuration files are all located at /etc/nginx/. If I use the below RTMP server block directly in the nginx.conf, the server starts up perfectly fine. However, as soon I remove the comment from the line include /etc/nginx/sites-enabled/*; in the nginx.conf, systemctl status nginx.service comes back with"nginx: [emerg] "rtmp" directive is not allowed here in /etc/nginx/sites-enabled/livestream:1
`
rtmp {
    server {
        listen 1935;
        chunk_size;

        application obs_output {
            live on:
            record off;
        }
    }
}
` These are the two guides I followed to install NGINX and the RTMP module. - https://helpdeskgeek.com/linux-tips/create-your-own-live-video-streaming-server-with-linux/ - https://www.scaleway.com/en/docs/setup-rtmp-streaming-server/ Any ideas what's going on here please? Many thanks in advance
Asked by willowen100 (67 rep)
Mar 30, 2020, 07:59 PM
Last activity: Mar 31, 2020, 10:52 PM