Igor Sysoev | 4 Jul 13:50 2008
Picon

Re: Streaming flv video to JW FLV media player 4.0

On Fri, Jul 04, 2008 at 01:30:57PM +0200, Thomas wrote:

> Why is my rewrite rule not working as expected? My video still doesn't
> want to scrub correctly.
> 
> Using the following config:
> ---
>   location ~ ^/videos/[\w|-]+\.flv.* {
>     rewrite ^/(videos)/([\w|-]+\.flv\?start=\d+).* /$1/$2 break;
>     root          /public;
>     flv;
>   }
> ---
> 
> Using my regexp tool, I get the following:
> 
> Request:
> /videos/video.flv?start=3850792&width=280&client=FLASH%20MAC%209,0,124,0&version=4.0%20$Rev:%2030%20$
> 
> Gets rewritten as:
> /videos/video.flv?start=3850792
> 
> Am I not understanding how Nginx rewrite and location work?

rewrite does work not with a query string.

Try the attached patch: it allows several values in query string.

--

-- 
Igor Sysoev
(Continue reading)

Alan Williamson | 4 Jul 15:23 2008

400 response ...

We are getting an awful lot of 400 responses being sent back to our clients.

For example, consider these two, first one resultsed in a 400, where as 
the second one didn't.

79.a.c.d - - [04/Jul/2008:13:14:21 +0000] GET /sportbladet/?service=rss 
HTTP/1.1 "400" 173 "-" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; 
en-US; rv:1.9) Gecko/2008061004 Firefox/3.0" "-"

79.a.c.d - - [04/Jul/2008:13:14:22 +0000] GET /sportbladet/?service=rss 
HTTP/1.1 "200" 18003 "-" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 
10.4; en-US; rv:1.9) Gecko/2008061004 Firefox/3.0" "-"

We are using nginx as a frontend loadbalancer, but our code does not 
generate 400 errors.  So under what circumstances would nginx return a 
400 request?

Thanks

a

--

-- 
Alan Williamson
  Registrationless email/sms reminders:  http://yourli.st/
  blog:  http://alan.blog-city.com/

Igor Sysoev | 4 Jul 16:41 2008
Picon

Re: 400 response ...

On Fri, Jul 04, 2008 at 02:23:46PM +0100, Alan Williamson wrote:

> We are getting an awful lot of 400 responses being sent back to our clients.
> 
> For example, consider these two, first one resultsed in a 400, where as 
> the second one didn't.
> 
> 79.a.c.d - - [04/Jul/2008:13:14:21 +0000] GET /sportbladet/?service=rss 
> HTTP/1.1 "400" 173 "-" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; 
> en-US; rv:1.9) Gecko/2008061004 Firefox/3.0" "-"
> 
> 79.a.c.d - - [04/Jul/2008:13:14:22 +0000] GET /sportbladet/?service=rss 
> HTTP/1.1 "200" 18003 "-" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 
> 10.4; en-US; rv:1.9) Gecko/2008061004 Firefox/3.0" "-"
> 
> 
> We are using nginx as a frontend loadbalancer, but our code does not 
> generate 400 errors.  So under what circumstances would nginx return a 
> 400 request?

Reasons of these errors are logged at info level in error_log:

error_log  /path/to/log  info;

--

-- 
Igor Sysoev
http://sysoev.ru/en/

Alan Williamson | 4 Jul 16:50 2008

Re: 400 response ...

>> We are using nginx as a frontend loadbalancer, but our code does not 
>> generate 400 errors.  So under what circumstances would nginx return a 
>> 400 request?
> 
> Reasons of these errors are logged at info level in error_log:
> 
> error_log  /path/to/log  info;

Thanks Igor --- i take it "info" isn't the default?  because we have 
nothing in that log file thus far.

--

-- 
Alan Williamson
  Registrationless email/sms reminders:  http://yourli.st/
  blog:  http://alan.blog-city.com/

Igor Sysoev | 4 Jul 16:53 2008
Picon

Re: 400 response ...

On Fri, Jul 04, 2008 at 03:50:47PM +0100, Alan Williamson wrote:

> >>We are using nginx as a frontend loadbalancer, but our code does not 
> >>generate 400 errors.  So under what circumstances would nginx return a 
> >>400 request?
> >
> >Reasons of these errors are logged at info level in error_log:
> >
> >error_log  /path/to/log  info;
> 
> Thanks Igor --- i take it "info" isn't the default?  because we have 
> nothing in that log file thus far.

The default level is notice.
Unimportant client errors are logged at info level.

--

-- 
Igor Sysoev
http://sysoev.ru/en/

Alan Williamson | 4 Jul 16:54 2008

Re: 400 response ...

>> We are using nginx as a frontend loadbalancer, but our code does not 
>> generate 400 errors.  So under what circumstances would nginx return a 
>> 400 request?
> 
> Reasons of these errors are logged at info level in error_log:
> 
> error_log  /path/to/log  info;

Thanks Igor --- i take it "info" isn't the default?  because we have
nothing in that log file thus far.

--

-- 
Alan Williamson
  Registrationless email/sms reminders:  http://yourli.st/
  blog:  http://alan.blog-city.com/

Thomas | 4 Jul 18:24 2008
Picon

Re: Streaming flv video to JW FLV media player 4.0

Fantastic Igor! It works.

Will you merge it in the stable version of Nginx or do you want to
keep it as a separate patch?

Thomas | 4 Jul 21:05 2008
Picon

Re: How to hide the server version?

For hiding Nginx from error pages, do I need to tweak the source code
or is there an option somewhere for that?

Marcos Neves | 4 Jul 21:11 2008
Picon

Re: How to hide the server version?

I created custom global 4xx and 5xx to hide the default nginx ones.
Is that what you need?

On Fri, Jul 4, 2008 at 4:05 PM, Thomas <iamkenzo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
For hiding Nginx from error pages, do I need to tweak the source code
or is there an option somewhere for that?




--
Marcos Neves
+55 44 3263-8132
+55 44 9918-8488
Almir Karic | 4 Jul 21:28 2008

Re: How to hide the server version?

i have     server_tokens off; and neither the headers nor the 404 error
page seem to contain the nginx version.

FWIW, don't fool yourself that by not showing the version is any more secure than with the
version displayed.

On Fri, Jul 04, 2008 at 09:05:43PM +0200, Thomas wrote:
> For hiding Nginx from error pages, do I need to tweak the source code
> or is there an option somewhere for that?
> 


Gmane