E
E
Eugene2019-05-20 15:34:40
Nginx
Eugene, 2019-05-20 15:34:40

How to remotely edit the /rtmp section in the nginx configuration file?

Good afternoon.
There is a server with nginx, which is used for restreaming on VK and YouTube. The link to the VK publication changes every time and the link to the broadcast in nginx.conf (/usr/local/nginx/conf/nginx.conf) is corrected through the console.
Is it possible to change the link through the web interface or something else + nginx reload?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
O. J, 2019-05-20
@Ej4k

- Nginx + Lua,
lua has such a thing as lua_shared_dict, this is a hashmap that works atomically regardless of the number of workers in nginx. In fact, you can pass as an argument to nginx a link to the stream
, something like
and in the /stream-update nginx location something like

local cache = ngx.shared.ourmegacache // ourmegacache - имя стора
local args = ngx.req.get_uri_args()
local link = tonumber(args.link) or ""
cache:set('url', link, 3600)

in the location that gives the stream, you just need to take the link from the
infa map here - https://github.com/openresty/lua-nginx-module#ngxs...
in general, I can say that lua_shared_dict in this case will work faster than radish or reading from file.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question