Welcome! Log In Create A New Profile

Advanced

Re: difficulty adding headers

Maxim Dounin
June 30, 2014 08:34PM
Hello!

On Mon, Jun 30, 2014 at 04:34:51PM -0400, ura wrote:

> ok, thanks.
>
> 1. i was thinking that this was the case, based on the results i have seen,
> yes.
> 2. ah, ok - i didn't appreciate that. i found this page with php code:
> http://licson.net/post/stream-videos-php/
>
> is there a standard / recommended way to approach this with nginx?

Streaming videos with php is silly, so recommended approach is
"Don't do that".

> 3. i believe the problem i am encountering is that i am unable to explicitly
> redirect file requests for a specific path (e.g. a path i create for use
> with streaming videos, called 'stream') to a specific static address in the
> server's filestorage, because every request is being handled via a php file
> and there is a .php location block in the site config. so if i create a
> location:
>
> location /stream/ {
> internal;
> root /var/www/data/;
> }
>
> and then navigate to www.mysite.tld/stream/blah.mp4

First of all, try removing "internal", as it will prevent handling
of all external requests.

> what is occuring is that the stream block is never processed and the .php
> block in the config is triggered instead.. i'm not 100% clear on why this is
> occurring.
>
> here's a sample elgg nginx config file that is basically similar to mine:
> https://gist.github.com/hellekin/755617

If you don't understand how requests are handled in your config,
it's probably good idea to throw it away and start with something
simple without regex locations, rewrites, if's and so on.

> i have created a new thread in the forum here for this topic, since you have
> really helpfully addressed my original question and the topic has changed.
> (new thread: http://forum.nginx.org/read.php?2,251295)

Just a note: it's not forum, it's a mailing list.

--
Maxim Dounin
http://nginx.org/

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

difficulty adding headers

ura June 27, 2014 11:50AM

Re: difficulty adding headers

Maxim Dounin June 27, 2014 12:50PM

Re: difficulty adding headers

ura June 27, 2014 12:54PM

Re: difficulty adding headers

ura June 27, 2014 12:58PM

Re: difficulty adding headers

Maxim Dounin June 27, 2014 02:08PM

Re: difficulty adding headers

ura June 27, 2014 02:23PM

Re: difficulty adding headers

ura June 27, 2014 02:50PM

Re: difficulty adding headers

Maxim Dounin June 27, 2014 03:22PM

Re: difficulty adding headers

ura June 27, 2014 07:26PM

Re: difficulty adding headers

Maxim Dounin June 27, 2014 10:02PM

Re: difficulty adding headers

ura June 28, 2014 10:44AM

Re: difficulty adding headers

ura June 28, 2014 12:17PM

Re: difficulty adding headers

Maxim Dounin June 30, 2014 03:18PM

Re: difficulty adding headers

ura June 30, 2014 04:34PM

Re: difficulty adding headers

Maxim Dounin June 30, 2014 08:34PM

Re: difficulty adding headers

ura July 04, 2014 09:48AM

Re: difficulty adding headers

Maxim Dounin July 04, 2014 12:36PM

Re: difficulty adding headers

Sophie Moussion July 25, 2014 03:40AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 122
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready