<div dir="ltr">  Hi,<div>I have a question, <br>I wanna use nginx and ffmpeg to serve chunks to clients without using or sending .m3u file to client. How can i do this lease? <br>* ffmpeg copy streams in local ( in /home/STREAMS/channel/stream%d.ts ==> 

 /home/STREAMS/channel/stream1.ts , 

 /home/STREAMS/channel/stream2.ts , 

 /home/STREAMS/channel/stream3.ts ....) <br>* I want nginx to serve clients chunk by chunk in a continuous  way without serving m3u file . <br>Thank you , </div><div>Fatma.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le mer. 2 juin 2021 à 16:27, Francis Daly <<a href="mailto:francis@daoine.org">francis@daoine.org</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Tue, Jun 01, 2021 at 07:40:27PM +0530, Amila Gunathilaka wrote:<br>
<br>
Hi there,<br>
<br>
> Hope you are doing good ?  Thanks for your quick responses for my emails<br>
> again.  I have 02 questions  for you today,  I will brief it down for your<br>
> ease.<br>
<br>
You're welcome.<br>
<br>
In general, if the questions are unrelated to the first one, it's best<br>
to start a new mail. That'll help someone search for questions and<br>
answers in the future.<br>
<br>
In this case, they are kind-of vaguely related, so we'll keep[ them in<br>
this thread.<br>
<br>
> But when I tail the /var.log/nginx/error.log file for<br>
> a moment and even after I log in by type username and password the error<br>
> log gives below error message unless the login is successful.<br>
> <br>
> <br>
> *tail -f  /var.log/nginx/error.log output*<br>
> 2021/06/01 11:25:26 [crit] 2379013#2379013: *57800 open()<br>
> "/var/lib/nginx/proxy/4/79/0000002794" failed (*13: Permission denied*)<br>
> while reading upstream, client: 172.20.0.201, server: 172.25.234.105,<br>
> request: "GET /metrics HTTP/1.1", upstream: "<a href="http://127.0.0.1:9091/metrics" rel="noreferrer" target="_blank">http://127.0.0.1:9091/metrics</a>",<br>
> host: "172.25.234.105"<br>
> <br>
> <br>
> So my first quiz is why it gives a Permission denied message for my request<br>
> through the browser even after I enter credentials and I can view /metrics<br>
> page contents.<br>
<br>
That is almost certainly because you also have "proxy_cache"<br>
(<a href="http://nginx.org/r/proxy_cache" rel="noreferrer" target="_blank">http://nginx.org/r/proxy_cache</a>) and "proxy_cache_path" defined, but<br>
configured to use part of the filesystem that the nginx user is not<br>
allowed to use -- maybe it was created or first run as one user, and<br>
now this user cannot write there?<br>
<br>
The simplest-to-understand fix, assuming that this is a test system<br>
where you are happy to start again, is probably to stop nginx, remove<br>
the /var/lib/nginx/proxy/ directory and all of its contents, create the<br>
directory again as the user that nginx runs as, and then start nginx.<br>
<br>
You should then see directories and files created, as cacheable responses<br>
are fetched.<br>
<br>
(There are other possible fixes too, of course.)<br>
<br>
> *quiz (2.) : * My second question for you is if I want to redirect the url,<br>
> such as when I enter  <a href="http://172.25.234.105:80" rel="noreferrer" target="_blank">http://172.25.234.105:80</a>  I want it to automatically<br>
> redirect it to the page   <a href="http://172.25.234.105/metrics" rel="noreferrer" target="_blank">http://172.25.234.105/metrics</a>. How could I<br>
> achieve that via nginx ?<br>
<br>
Something like<br>
<br>
    location = / { return 301 /metrics/; }<br>
<br>
should probably work. Any access control on /metrics/ would still apply<br>
to the next request that the client makes, so it probably is ok not to<br>
require authentication for this one request.<br>
<br>
Good luck with it,<br>
<br>
        f<br>
-- <br>
Francis Daly        <a href="mailto:francis@daoine.org" target="_blank">francis@daoine.org</a><br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org" target="_blank">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
</blockquote></div>