2009年11月30日星期一

Re: How to log the time in the UTC time format?

On Tue, Dec 01, 2009 at 12:52:24AM +0300, Maxim Dounin wrote:

> Hello!
>
> On Mon, Nov 30, 2009 at 04:31:20PM -0500, naltimari wrote:
>
> > I need my logs in UTC time format, but nginx by default uses the local time format (I guess in GMT format).
> >
> > Can it be done? How?
>
> There is no "UTC time format". If you mean time zone - just set
> appropriate one in environment while starting nginx (via TZ
> environment variable).

BTW, TZ can be set in nginx.conf at global level:

env TZ=UTC;


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

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

Re: case sensitive locations on macos x

thanks for the fast answer, this did the trick

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,26771,26943#msg-26943


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

Re: Why does Nginx log same request two times?

Was it ever determined whether this was an issue with the logger or with double-connections? I'm getting double-log entries while using nginx as a load balancer in front of 3 other servers. For a double-log entry on nginx side, there are two individual log entries on the target servers.

Any idea if my issue is related to this one?

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,26189,26936#msg-26936


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

Re: Multiple Entries in Log File

Why did that solve the problem for this individual? This doesn't really answer my question anyways, I'm trying to determine why it would be logging it twice, not how to get around the issue.

The servers behind nginx are showing two connections...

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,26839,26934#msg-26934


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

nginx-0.8.29 released

FYI

Igor has just released Nginx 0.8.39

Original: http://nginx.org/pipermail/nginx-announce/2009/000001.html

Quote:
--------------------

Changes with nginx 0.8.29 30 Nov
2009

*) Change: now the "009" status code is written to an access log for
proxied HTTP/0.9 responses.

*) Feature: the "addition_types", "charset_types", "gzip_types",
"ssi_types", "sub_filter_types", and "xslt_types" directives
support
an "*" parameter.

*) Feature: GCC 4.1+ built-in atomic operations usage.
Thanks to W-Mark Kubacki.

*) Feature: the --with-libatomic[=DIR] option in the configure.
Thanks to W-Mark Kubacki.

*) Bugfix: listen unix domain socket had limited access rights.

*) Bugfix: cached HTTP/0.9 responses were handled incorrectly.

*) Bugfix: regular expression named captures given by "?P<...>" did
not
work in a "server_name" directive.
Thanks to Maxim Dounin.


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

--------------------

Hi Igor,

Could you kindly give more details on the new features?

> Feature: the "addition_types", "charset_types", "gzip_types",
"ssi_types", "sub_filter_types", and "xslt_types" directives
support
an "*" parameter.

> Feature: GCC 4.1+ built-in atomic operations usage.
Thanks to W-Mark Kubacki.

> Feature: the --with-libatomic[=DIR] option in the configure.
Thanks to W-Mark Kubacki.

Thanks

Dinh
--
Posted via http://www.ruby-forum.com/.

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

Re: Multiple Entries in Log File

On Mon, Nov 30, 2009 at 8:36 PM, cpriest <nginx-forum@nginx.us> wrote:
> I have nginx setup as a load balancer to three servers.  Is there *any* reason a request would hit the log file more than once unless there were actually more than one incoming (from the internet) requests?
>
> For example, if one of my internal servers is down or slow and a proxy timeout setting is reached, would that cause nginx to log twice to the access log?  Would there be any message about said occurrence in any error or other log?
>

uhm? http://forum.nginx.org/read.php?2,26189,26201#msg-26201

mk
--
(let* ((mk "Michał Kowalski") (sig `(lambda () ,mk))) ((eval sig)))

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

Re: How to log the time in the UTC time format?

Maxim Dounin Wrote:

> The only option for now is to use something like
> embedded perl to construct time in arbitrary format
>
> perl_set $tt 'sub { scalar localtime }';

Although it is not appropriate for me, thanks for the input, I never knew this could done!

Well, I'm going to parse the log myself, so I can always change the time format later.

I'm really not sure if UTC will make any difference, I was only looking it up as a client request.

Thanks for your help!
[]s

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,26862,26886#msg-26886


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

Re: How to log the time in the UTC time format?

Hello!

On Mon, Nov 30, 2009 at 05:06:57PM -0500, naltimari wrote:

> Well, maybe you're right, but what I need is the same time that would come from 'date -u' command.
>
> Right now, my log time format is like this: 30/Nov/2009:16:14:39 -0200

It's date and time in common log format
(http://en.wikipedia.org/wiki/Common_Log_Format).

> When I need this: Mon Nov 30 18:14:39 UTC 2009
>
> Can I change the syntax/format in which the date is written to the log?

No, the is no way to specify arbitrary format for time. The only
available options out-of-the box is $time_local (time in common log
format) and $msec (seconds since the Epoch with milliseconds
resolution).

The only option for now is to use something like embedded perl to
construct time in arbitrary format, something like

perl_set $tt 'sub { scalar localtime }';

and then use it in logs via appropriate log_format. But I don't
really think it's a good way to go.

BTW, could you please explain why do you need time in this particular
format?

Maxim Dounin

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

Re: How to log the time in the UTC time format?

Well, maybe you're right, but what I need is the same time that would come from 'date -u' command.

Right now, my log time format is like this: 30/Nov/2009:16:14:39 -0200

When I need this: Mon Nov 30 18:14:39 UTC 2009

Can I change the syntax/format in which the date is written to the log?


I appreciate your help.
[]s

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,26862,26870#msg-26870


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

Re: How to log the time in the UTC time format?

Hello!

On Mon, Nov 30, 2009 at 04:31:20PM -0500, naltimari wrote:

> I need my logs in UTC time format, but nginx by default uses the local time format (I guess in GMT format).
>
> Can it be done? How?

There is no "UTC time format". If you mean time zone - just set
appropriate one in environment while starting nginx (via TZ
environment variable).

Maxim Dounin

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

How to log the time in the UTC time format?

I need my logs in UTC time format, but nginx by default uses the local time format (I guess in GMT format).

Can it be done? How?

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,26862,26862#msg-26862


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

Multiple Entries in Log File

I have nginx setup as a load balancer to three servers. Is there *any* reason a request would hit the log file more than once unless there were actually more than one incoming (from the internet) requests?

For example, if one of my internal servers is down or slow and a proxy timeout setting is reached, would that cause nginx to log twice to the access log? Would there be any message about said occurrence in any error or other log?

Thanks,

-Clint

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,26839,26839#msg-26839


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

Re: nginx-0.8.29

-------- Original-Nachricht --------
> Datum: Mon, 30 Nov 2009 18:05:48 +0300
> Von: Igor Sysoev <igor@sysoev.ru>
> An: nginx@nginx.org
> Betreff: Re: nginx-0.8.29

> On Mon, Nov 30, 2009 at 04:00:08PM +0100, Steve wrote:
>
> > > > > On Mon, Nov 30, 2009 at 02:55:00PM +0100, Steve wrote:
> > > > >
> > > > > > > *) Feature: the --with-libatomic[=DIR] option in the
> > > configure.
> > > > > > > Thanks to W-Mark Kubacki.
> > > > > > >
> > > > > > What is this libatomic? Is it this here ->
> > > > > http://www.hpl.hp.com/research/linux/atomic_ops/
> > > > >
> > > > > Yes.
> > > > >
> > > > Is that needed if one is using GCC >= 4.1? Or is this already used
> (in
> > > some way) by this here:
> > > > > *) Feature: GCC 4.1+ built-in atomic operations usage.
> > > > > Thanks to W-Mark Kubacki.
> > >
> > > If GCC supports atomic operations, then nginx uses them. Otherwise, it
> > > uses
> > > own atomic operations for i386, amd64, sparc32/64, ppc32/64.
> > >
> > > You may force to use libatomic, if you do not like GCC atomic
> operations.
> > >
> > Okay. I understand. Is there any benefit using libatomic?
>
> GCC built-ins are better at least for i386 and amd64.
> libatomic is better for ARM:
> http://nginx.org/pipermail/nginx/2009-September/015726.html
>
Thanks for explaining that to me.


>
> --
> Igor Sysoev
> http://sysoev.ru/en/
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://nginx.org/mailman/listinfo/nginx

--
Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3.5 -
sicherer, schneller und einfacher! http://portal.gmx.net/de/go/chbrowser

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

Bad requests with 0-byte response

Hello,

I'm using nginx 0.6.35 with syslog patch, and have a few POST requests
everyday that are aborted by nginx, with no error message being
reported to the error log. The status code returned is 400, and there
is no single byte written by nginx. Those requests are supposed to be
forwarded to a FastCGI application, but the latter is never reached,
connection is aborted right away.

How to diagnose what's going wrong? Is there a way to trace aborted
requests, or requests to a specific location? If there is no such
possibility, I'll probably rebuild nginx with the debug configure
switch turned on, but I'm a bit concerned to run it in production,
with thousands of requests every second.

Thanks in advance,
--
Jean-Baptiste Quenot

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

Re: nginx-0.8.29

Steve,
check the mailing list for info about this: http://www.ruby-forum.com/topic/196083

There's info on this at the home page you posted as well.

And yes, its snappier.


Cheers,
Johan

On 30 nov 2009, at 16.00, Steve wrote:

>
> -------- Original-Nachricht --------
>> Datum: Mon, 30 Nov 2009 17:55:40 +0300
>> Von: Igor Sysoev <igor@sysoev.ru>
>> An: nginx@nginx.org
>> Betreff: Re: nginx-0.8.29
>
>> On Mon, Nov 30, 2009 at 03:51:40PM +0100, Steve wrote:
>>
>>>
>>> -------- Original-Nachricht --------
>>>> Datum: Mon, 30 Nov 2009 17:32:41 +0300
>>>> Von: Igor Sysoev <igor@sysoev.ru>
>>>> An: nginx@nginx.org
>>>> Betreff: Re: nginx-0.8.29
>>>
>>>> On Mon, Nov 30, 2009 at 02:55:00PM +0100, Steve wrote:
>>>>
>>>>>> *) Feature: the --with-libatomic[=DIR] option in the
>> configure.
>>>>>> Thanks to W-Mark Kubacki.
>>>>>>
>>>>> What is this libatomic? Is it this here ->
>>>> http://www.hpl.hp.com/research/linux/atomic_ops/
>>>>
>>>> Yes.
>>>>
>>> Is that needed if one is using GCC >= 4.1? Or is this already used (in
>> some way) by this here:
>>>> *) Feature: GCC 4.1+ built-in atomic operations usage.
>>>> Thanks to W-Mark Kubacki.
>>
>> If GCC supports atomic operations, then nginx uses them. Otherwise, it
>> uses
>> own atomic operations for i386, amd64, sparc32/64, ppc32/64.
>>
>> You may force to use libatomic, if you do not like GCC atomic operations.
>>
> Okay. I understand. Is there any benefit using libatomic?
>
>
>>
>> --
>> Igor Sysoev
>> http://sysoev.ru/en/
>>
>> _______________________________________________
>> nginx mailing list
>> nginx@nginx.org
>> http://nginx.org/mailman/listinfo/nginx
>
> --
> Preisknaller: GMX DSL Flatrate für nur 16,99 Euro/mtl.!
> http://portal.gmx.net/de/go/dsl02
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://nginx.org/mailman/listinfo/nginx

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

Re: nginx-0.8.29

On Mon, Nov 30, 2009 at 04:00:08PM +0100, Steve wrote:

> > > > On Mon, Nov 30, 2009 at 02:55:00PM +0100, Steve wrote:
> > > >
> > > > > > *) Feature: the --with-libatomic[=DIR] option in the
> > configure.
> > > > > > Thanks to W-Mark Kubacki.
> > > > > >
> > > > > What is this libatomic? Is it this here ->
> > > > http://www.hpl.hp.com/research/linux/atomic_ops/
> > > >
> > > > Yes.
> > > >
> > > Is that needed if one is using GCC >= 4.1? Or is this already used (in
> > some way) by this here:
> > > > *) Feature: GCC 4.1+ built-in atomic operations usage.
> > > > Thanks to W-Mark Kubacki.
> >
> > If GCC supports atomic operations, then nginx uses them. Otherwise, it
> > uses
> > own atomic operations for i386, amd64, sparc32/64, ppc32/64.
> >
> > You may force to use libatomic, if you do not like GCC atomic operations.
> >
> Okay. I understand. Is there any benefit using libatomic?

GCC built-ins are better at least for i386 and amd64.
libatomic is better for ARM:
http://nginx.org/pipermail/nginx/2009-September/015726.html


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

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

Re: nginx-0.8.29

-------- Original-Nachricht --------
> Datum: Mon, 30 Nov 2009 17:55:40 +0300
> Von: Igor Sysoev <igor@sysoev.ru>
> An: nginx@nginx.org
> Betreff: Re: nginx-0.8.29

> On Mon, Nov 30, 2009 at 03:51:40PM +0100, Steve wrote:
>
> >
> > -------- Original-Nachricht --------
> > > Datum: Mon, 30 Nov 2009 17:32:41 +0300
> > > Von: Igor Sysoev <igor@sysoev.ru>
> > > An: nginx@nginx.org
> > > Betreff: Re: nginx-0.8.29
> >
> > > On Mon, Nov 30, 2009 at 02:55:00PM +0100, Steve wrote:
> > >
> > > > > *) Feature: the --with-libatomic[=DIR] option in the
> configure.
> > > > > Thanks to W-Mark Kubacki.
> > > > >
> > > > What is this libatomic? Is it this here ->
> > > http://www.hpl.hp.com/research/linux/atomic_ops/
> > >
> > > Yes.
> > >
> > Is that needed if one is using GCC >= 4.1? Or is this already used (in
> some way) by this here:
> > > *) Feature: GCC 4.1+ built-in atomic operations usage.
> > > Thanks to W-Mark Kubacki.
>
> If GCC supports atomic operations, then nginx uses them. Otherwise, it
> uses
> own atomic operations for i386, amd64, sparc32/64, ppc32/64.
>
> You may force to use libatomic, if you do not like GCC atomic operations.
>
Okay. I understand. Is there any benefit using libatomic?


>
> --
> Igor Sysoev
> http://sysoev.ru/en/
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://nginx.org/mailman/listinfo/nginx

--
Preisknaller: GMX DSL Flatrate für nur 16,99 Euro/mtl.!
http://portal.gmx.net/de/go/dsl02

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

Re: case sensitive locations on macos x

On Mon, Nov 30, 2009 at 09:52:00AM -0500, dobe wrote:

> hi all
>
> we found out, that at least on macosx nginx 0.7.64 the location directives are not case sensitive, in particular the exact match locations.

Yes, since a typical MacOSX file system is case insensitive.

> is there any way to get the same behaviour as on linux where those directives are case sensitive (e.g. through a compile time option?)

./configure --with-cc-opt="-D NGX_HAVE_CASELESS_FILESYSTEM=0"


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

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

Re: nginx-0.8.29

On Mon, Nov 30, 2009 at 03:51:40PM +0100, Steve wrote:

>
> -------- Original-Nachricht --------
> > Datum: Mon, 30 Nov 2009 17:32:41 +0300
> > Von: Igor Sysoev <igor@sysoev.ru>
> > An: nginx@nginx.org
> > Betreff: Re: nginx-0.8.29
>
> > On Mon, Nov 30, 2009 at 02:55:00PM +0100, Steve wrote:
> >
> > > > *) Feature: the --with-libatomic[=DIR] option in the configure.
> > > > Thanks to W-Mark Kubacki.
> > > >
> > > What is this libatomic? Is it this here ->
> > http://www.hpl.hp.com/research/linux/atomic_ops/
> >
> > Yes.
> >
> Is that needed if one is using GCC >= 4.1? Or is this already used (in some way) by this here:
> > *) Feature: GCC 4.1+ built-in atomic operations usage.
> > Thanks to W-Mark Kubacki.

If GCC supports atomic operations, then nginx uses them. Otherwise, it uses
own atomic operations for i386, amd64, sparc32/64, ppc32/64.

You may force to use libatomic, if you do not like GCC atomic operations.


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

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

case sensitive locations on macos x

hi all

we found out, that at least on macosx nginx 0.7.64 the location directives are not case sensitive, in particular the exact match locations.

is there any way to get the same behaviour as on linux where those directives are case sensitive (e.g. through a compile time option?)

thanks in advance, bernd

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,26771,26771#msg-26771


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

Re: nginx-0.8.29

-------- Original-Nachricht --------
> Datum: Mon, 30 Nov 2009 17:32:41 +0300
> Von: Igor Sysoev <igor@sysoev.ru>
> An: nginx@nginx.org
> Betreff: Re: nginx-0.8.29

> On Mon, Nov 30, 2009 at 02:55:00PM +0100, Steve wrote:
>
> > > *) Feature: the --with-libatomic[=DIR] option in the configure.
> > > Thanks to W-Mark Kubacki.
> > >
> > What is this libatomic? Is it this here ->
> http://www.hpl.hp.com/research/linux/atomic_ops/
>
> Yes.
>
Is that needed if one is using GCC >= 4.1? Or is this already used (in some way) by this here:
> *) Feature: GCC 4.1+ built-in atomic operations usage.
> Thanks to W-Mark Kubacki.


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

> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://nginx.org/mailman/listinfo/nginx

--
Sarah Kreuz, die DSDS-Siegerin der Herzen, mit ihrem eindrucksvollen
Debütalbum "One Moment in Time". http://portal.gmx.net/de/go/musik

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

Proxy cache only is cookie present

Hello,

I'm using nginx/0.7.62 to proxy requests to apache2+mod_php and I would like to cache content only if a cookie has a value present: "usergroup = 1"

How am I able to archive this?

Thanks

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,26770,26770#msg-26770


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

Re: nginx-0.8.29

On Mon, Nov 30, 2009 at 02:55:00PM +0100, Steve wrote:

> > *) Feature: the --with-libatomic[=DIR] option in the configure.
> > Thanks to W-Mark Kubacki.
> >
> What is this libatomic? Is it this here -> http://www.hpl.hp.com/research/linux/atomic_ops/

Yes.


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

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

Re: nginx-0.8.29

-------- Original-Nachricht --------
> Datum: Mon, 30 Nov 2009 16:44:06 +0300
> Von: Igor Sysoev <igor@sysoev.ru>
> An: nginx@nginx.org
> Betreff: nginx-0.8.29

> Changes with nginx 0.8.29 30 Nov
> 2009
>
> *) Change: now the "009" status code is written to an access log for
> proxied HTTP/0.9 responses.
>
> *) Feature: the "addition_types", "charset_types", "gzip_types",
> "ssi_types", "sub_filter_types", and "xslt_types" directives
> support
> an "*" parameter.
>
> *) Feature: GCC 4.1+ built-in atomic operations usage.
> Thanks to W-Mark Kubacki.
>
> *) Feature: the --with-libatomic[=DIR] option in the configure.
> Thanks to W-Mark Kubacki.
>
What is this libatomic? Is it this here -> http://www.hpl.hp.com/research/linux/atomic_ops/


> *) Bugfix: listen unix domain socket had limited access rights.
>
> *) Bugfix: cached HTTP/0.9 responses were handled incorrectly.
>
> *) Bugfix: regular expression named captures given by "?P<...>" did
> not
> work in a "server_name" directive.
> Thanks to Maxim Dounin.
>
>
> --
> Igor Sysoev
> http://sysoev.ru/en/
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://nginx.org/mailman/listinfo/nginx

--
Sarah Kreuz, die DSDS-Siegerin der Herzen, mit ihrem eindrucksvollen
Debütalbum "One Moment in Time". http://portal.gmx.net/de/go/musik

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

Re: Rewrite

One more thing,
Is there a way to redirect from location rss.xml, to location / depends on the args ?

location = /rss.xml {
root /home/site/public_html;
access_log off;
expires 10m;

if ($args ~ "^type=popular&cid=(\d+)") {
set $cid $1;
rewrite ^ /cache_sql/rss/popular_$cid.xml break;
}

if ($args ~ "^type=search") {
#redirect to location /
}
}

location / {
root /home/site/public_html;
access_log off;
proxy_pass http://localhost:8080;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,26530,26746#msg-26746


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

nginx-0.8.29

Changes with nginx 0.8.29 30 Nov 2009

*) Change: now the "009" status code is written to an access log for
proxied HTTP/0.9 responses.

*) Feature: the "addition_types", "charset_types", "gzip_types",
"ssi_types", "sub_filter_types", and "xslt_types" directives support
an "*" parameter.

*) Feature: GCC 4.1+ built-in atomic operations usage.
Thanks to W-Mark Kubacki.

*) Feature: the --with-libatomic[=DIR] option in the configure.
Thanks to W-Mark Kubacki.

*) Bugfix: listen unix domain socket had limited access rights.

*) Bugfix: cached HTTP/0.9 responses were handled incorrectly.

*) Bugfix: regular expression named captures given by "?P<...>" did not
work in a "server_name" directive.
Thanks to Maxim Dounin.


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

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

how to proxy pass one jsp dir that under a static web to tomcat:8080 ?

at first , thank you very much for helping me !
and now I have a new problem ,
I have a new server , totally , this is a static website , but one dir is jsp , so my head turn bigger ...
the web works ok but this jsp dir
this is my conf ,
-------------------------------
server {
listen 80;
server_name aaa.aaa.com;
error_page 404 http://aaa.aaa.com/error/error.html;
location / {
root /web/htdocs;
index index.htm index.html index.jsp;
ssi on;
ssi_silent_errors on;
ssi_types text/shtml;
}
location /status {
stub_status on;
auth_basic "NginxStatus";
allow 111.111.111.0/24;
}
location ~ .*\.(jsp|do|action)$ {
root /web/htdocs/jsp/;
proxy_pass http://localhost:8080 ;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
}
location /servlet/ {
root /web/htdocs/jsp/;
proxy_pass http://localhost:8080 ;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
}
location /error.html {
root /web/htdocs/error/;
}

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,26696,26696#msg-26696


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

Re: I'm confused about the parameter in http{} , my example is here

thank you very much , please forigive my ignorance

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,26195,26687#msg-26687


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

Re: Default value of fastcgi_cache_path

Hello!

On Mon, Nov 30, 2009 at 09:53:52AM +0100, Dinh Pham wrote:

> I am reading
> http://wiki.nginx.org/NginxHttpFcgiModule#fastcgi_cache_path and found
> that fastcgi_cache_path are not documented.

It is documented:

http://sysoev.ru/nginx/docs/http/ngx_http_fastcgi_module.html#fastcgi_cache_path

There is no English translation in wiki though, feel free to add
one.

> Any idea how it works if I don't specify it explicitly?

There is no default, you have to specify it if you want cache to
work.

Maxim Dounin

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

Default value of fastcgi_cache_path

Hi,

I am reading
http://wiki.nginx.org/NginxHttpFcgiModule#fastcgi_cache_path and found
that fastcgi_cache_path are not documented. Any idea how it works if I
don't specify it explicitly?


Best regards,

Dinh
--
Posted via http://www.ruby-forum.com/.

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

2009年11月29日星期日

Re: Nginx 0.8.14 - cookie / proxy_pass issue

Thanks Igor, That appears to have taken care of it. Appreciate the help.

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,7568,26615#msg-26615


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

Re: Rewrite

ohh just noticed post by Maxim Dounin, thank you !!!!!

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,26530,26595#msg-26595


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

Re: Rewrite

I've made it like

location = /rss.xml {
if ($args ~ ^type=popular&cid=([0-9]+)) {
rewrite ^ /cache/rss/popular_$1.xml break;
}
}

and get error: pattern "^" has less captures than referrenced in substitution "/cache/rss/popular_$1.xml"

I guess its about rewrite ^, so where should I place ([0-9]+) to get the number ?
I've tested with rewrite ^cid=([0-9]+) but doesn't work

I'm still learning nginx, but it's great web server

Thank you !

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,26530,26594#msg-26594


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

Re: Rewrite

Hello!

On Sun, Nov 29, 2009 at 03:53:49PM -0500, thinkbot wrote:

> Thank you Igor !!!
>
> One more thing, is there a way to put there regular expressions, something like
>
> location = /rss.xml {
> if ($args ~ ^type=popular&cid=([0-9]+) {
> rewrite ^ /cache/rss/popular_$1.xml break;
> }
> }

location = /rss.xml {
if ($args ~ "^type=popular&cid=([0-9]+)") {
set $cid $1;
rewrite ^ /cache/rss/popular_$cid.xml break;
}
}

Maxim Dounin

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

Re: Rewrite

On Sun, Nov 29, 2009 at 03:53:49PM -0500, thinkbot wrote:

> Thank you Igor !!!
>
> One more thing, is there a way to put there regular expressions, something like
>
> location = /rss.xml {
> if ($args ~ ^type=popular&cid=([0-9]+) {
> rewrite ^ /cache/rss/popular_$1.xml break;
> }
> }

Yes. You may also use "\d+" instead of "[0-9]+".


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

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

Re: Rewrite

Thank you Igor !!!

One more thing, is there a way to put there regular expressions, something like

location = /rss.xml {
if ($args ~ ^type=popular&cid=([0-9]+) {
rewrite ^ /cache/rss/popular_$1.xml break;
}
}

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,26530,26561#msg-26561


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

Re: Rewrite

On Sun, Nov 29, 2009 at 01:21:14PM -0500, thinkbot wrote:

> Hello,
>
> I wanted to rewrite this url
>
> rss.xml?type=popular&cid=8
> to
> /cache/rss/popular_8.xml
>
> so I wrote
>
> location ~* \.(jpg|jpeg|gif|css|png|js|ico|xml)$ {
> root /home/site/public_html;
> access_log off;
> expires 30d;
>
> rewrite ^rss\.xml?type=popular&cid=(.*)$ /cache/rss/popular_8.xml break;
> }
>
> But it doesn't work :/
> Can anyone help me out with this ? let me know what I'm doing wrong

root /home/site/public_html;

location = /rss.xml {
if ($args ~ ^type=popular&cid=8) {
rewrite ^ /cache/rss/popular_8.xml break;
}
}


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

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

Rewrite

Hello,

I wanted to rewrite this url

rss.xml?type=popular&cid=8
to
/cache/rss/popular_8.xml

so I wrote

location ~* \.(jpg|jpeg|gif|css|png|js|ico|xml)$ {
root /home/site/public_html;
access_log off;
expires 30d;

rewrite ^rss\.xml?type=popular&cid=(.*)$ /cache/rss/popular_8.xml break;
}

But it doesn't work :/
Can anyone help me out with this ? let me know what I'm doing wrong

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,26530,26530#msg-26530


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

Re: Bizarre? Logging: $variable_* vs $upstream_http_*

I was wrong, it DOES work. It helps to edit the right config file sometimes. :) Sorry, Max.

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,26404,26521#msg-26521


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

Re: Bizarre? Logging: $variable_* vs $upstream_http_*

Thanks, Max. If that's the case then calling set in the @error location a lo tof sense. However, $remember, is still coming back blank -- perphaps someting to do with the error_page directive?

Any ideas or alternatives for remembering the header information (to be recalled in @error) would be much appreciated. Thanks!

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,26404,26519#msg-26519


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

Multiple fastcgi connection

Hi,

I've got a question about FastCGI. I have a long php script that
takes a few seconds to run. The problem is that any new requests
to php are delayed until the first script has finished executing.
I've tried configuring Nginx with more php fastcgi servers, but
this did not help.

I'm using Windows with nginx v0.8.27.

Is this the way it is supposed to work? Can I do something
about it?

I really hope someone can explain this to me, because I'm really
in the dark here.

Best regards,

AlDee

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,26506,26506#msg-26506


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

Re: gzip just fails

Paul Roland wrote:

> I have both error_log /opt/btnws2/logs/debug.log debug;
> and access_log /opt/btnws2/logs/debug2.log; enabled,
> no error is shown and no debug is made.

./configure --with-debug needed:
$ ./configure --help | grep debug
--with-debug enable the debugging logging

--
Best regards,
Gena

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

Re: gzip just fails / update on gzip issue.

nope, both were build the same.

./configure --prefix=/opt/btnws2 --with-http_stub_status_module --with-http_gzip_static_module --conf-path=/opt/btnws2/server.conf

this is my configure line

Configuration summary
+ using system PCRE library
+ OpenSSL library is not used
+ md5: using system crypto library
+ sha1 library is not used
+ using system zlib library


--- On Sun, 11/29/09, Jeff Waugh <jdub@bethesignal.org> wrote:

> From: Jeff Waugh <jdub@bethesignal.org>
> Subject: Re: gzip just fails / update on gzip issue.
> To: nginx@nginx.org
> Date: Sunday, November 29, 2009, 3:14 PM
> <quote who="Paul Roland">
>
> > switching back to stable makes gzip work with the
> exact same configuration
> > so that is clearly an nginx issue.
>
> ... or a build issue.
>
> - Jeff
>
> --
> linux.conf.au 2010: Wellington, NZ     
>           http://www.lca2010.org.nz/
>
>                
>           I am Jack's smoking gun.
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://nginx.org/mailman/listinfo/nginx
>


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

Re: gzip just fails / update on gzip issue.

<quote who="Paul Roland">

> switching back to stable makes gzip work with the exact same configuration
> so that is clearly an nginx issue.

... or a build issue.

- Jeff

--
linux.conf.au 2010: Wellington, NZ http://www.lca2010.org.nz/

I am Jack's smoking gun.

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

Re: gzip just fails / update on gzip issue.

switching back to stable makes gzip work with the exact same configuration so that is clearly an nginx issue.

--- On Sun, 11/29/09, Mark Maunder <mark@feedjit.com> wrote:

> From: Mark Maunder <mark@feedjit.com>
> Subject: Re: gzip just fails
> To: nginx@nginx.org
> Date: Sunday, November 29, 2009, 2:07 PM
> Start with a basic gzip config:
>
> gzip on;
> gzip_min_length  1100;
> gzip_buffers     4 8k;
> gzip_types       text/plain
> text/css application/x-javascript text/xml application/xml
> application/xml+rss text/javascript;
>
> Check that nginx is now gzipping. Then add things like
> gzip_http_version and gzip_disable (doing an nginx reload
> each time) and see which one causes nginx to stop gzipping.
>
> Mark.
>
>
>
> Paul Roland wrote:
> > Hey, I've tried kind of everything but it seems like
> nginx just won't gzip.
> >
> > I have this in http zone, no page is gziped, only php
> ones but that's php's internal compression.
> > I also receive Transfer-Encoding   
> chunked from server.
> >
> > Any ideas? this is nginx-0.8.28
> >
> >      include   
>    /etc/mime.types;
> >      default_type 
> application/octet-stream;
> >      access_log off;
> >      sendfile 
>    on;
> >      gzip       
>       on;
> >      gzip_proxied     
> any;
> >     
> gzip_comp_level   5;
> >      gzip_types     
>   text/plain text/css application/x-javascript text/xml
> application/xml;
> >      gzip_http_version 1.1;
> >      gzip_disable 
>    "MSIE [1-6]\.";
> >      server_names_hash_bucket_size
> 128;
> >      autoindex  on;
> >     
> error_page   404       
>   /btnerror/404.html;
> >      log_not_found off;
> >      server_tokens off;
> >      client_max_body_size 32m;
> >
> >
> >
> >       
> > _______________________________________________
> > nginx mailing list
> > nginx@nginx.org
> > http://nginx.org/mailman/listinfo/nginx
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://nginx.org/mailman/listinfo/nginx
>


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

Re: gzip just fails

I have both error_log /opt/btnws2/logs/debug.log debug; and access_log /opt/btnws2/logs/debug2.log; enabled, no error is shown and no debug is made.

--- On Sun, 11/29/09, Mark Maunder <mark@feedjit.com> wrote:

> From: Mark Maunder <mark@feedjit.com>
> Subject: Re: gzip just fails
> To: nginx@nginx.org
> Date: Sunday, November 29, 2009, 2:07 PM
> Start with a basic gzip config:
>
> gzip on;
> gzip_min_length  1100;
> gzip_buffers     4 8k;
> gzip_types       text/plain
> text/css application/x-javascript text/xml application/xml
> application/xml+rss text/javascript;
>
> Check that nginx is now gzipping. Then add things like
> gzip_http_version and gzip_disable (doing an nginx reload
> each time) and see which one causes nginx to stop gzipping.
>
> Mark.
>
>
>
> Paul Roland wrote:
> > Hey, I've tried kind of everything but it seems like
> nginx just won't gzip.
> >
> > I have this in http zone, no page is gziped, only php
> ones but that's php's internal compression.
> > I also receive Transfer-Encoding   
> chunked from server.
> >
> > Any ideas? this is nginx-0.8.28
> >
> >      include   
>    /etc/mime.types;
> >      default_type 
> application/octet-stream;
> >      access_log off;
> >      sendfile 
>    on;
> >      gzip       
>       on;
> >      gzip_proxied     
> any;
> >     
> gzip_comp_level   5;
> >      gzip_types     
>   text/plain text/css application/x-javascript text/xml
> application/xml;
> >      gzip_http_version 1.1;
> >      gzip_disable 
>    "MSIE [1-6]\.";
> >      server_names_hash_bucket_size
> 128;
> >      autoindex  on;
> >     
> error_page   404       
>   /btnerror/404.html;
> >      log_not_found off;
> >      server_tokens off;
> >      client_max_body_size 32m;
> >
> >
> >
> >       
> > _______________________________________________
> > nginx mailing list
> > nginx@nginx.org
> > http://nginx.org/mailman/listinfo/nginx
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://nginx.org/mailman/listinfo/nginx
>


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

Re: gzip just fails

Start with a basic gzip config:

gzip on;
gzip_min_length 1100;
gzip_buffers 4 8k;
gzip_types text/plain text/css application/x-javascript text/xml
application/xml application/xml+rss text/javascript;

Check that nginx is now gzipping. Then add things like gzip_http_version
and gzip_disable (doing an nginx reload each time) and see which one
causes nginx to stop gzipping.

Mark.

Paul Roland wrote:
> Hey, I've tried kind of everything but it seems like nginx just won't gzip.
>
> I have this in http zone, no page is gziped, only php ones but that's php's internal compression.
> I also receive Transfer-Encoding chunked from server.
>
> Any ideas? this is nginx-0.8.28
>
> include /etc/mime.types;
> default_type application/octet-stream;
> access_log off;
> sendfile on;
> gzip on;
> gzip_proxied any;
> gzip_comp_level 5;
> gzip_types text/plain text/css application/x-javascript text/xml application/xml;
> gzip_http_version 1.1;
> gzip_disable "MSIE [1-6]\.";
> server_names_hash_bucket_size 128;
> autoindex on;
> error_page 404 /btnerror/404.html;
> log_not_found off;
> server_tokens off;
> client_max_body_size 32m;
>
>
>
>
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://nginx.org/mailman/listinfo/nginx

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

Re: Bizarre? Logging: $variable_* vs $upstream_http_*

Hello!

On Sun, Nov 29, 2009 at 03:19:10AM -0500, icqheretic wrote:

> If this is expected behavior how to I go about passing information when an internal redirect is involved between two different locations.
>
> For example:
>
> Location /u1 {
> set $remember $upstream_http_content_type;

- set $remember $upstream_http_content_type;

> proxy_pass http://127.0.0.1:6060;
> error_page 404 403 = @error;
>
> }
>
>
> Location @error {

+ set $remember $upstream_http_content_type;

> # recall $remember here, perhaps for logging.
> }

Maxim Dounin

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

Re: Bizarre? Logging: $variable_* vs $upstream_http_*

Hello!

On Sun, Nov 29, 2009 at 03:16:26AM -0500, icqheretic wrote:

> Consider this configuration fragment:
>
>
> log_format test_log 'TEST: [$origin_ip] [$upstream_http_content_type]';
>
> location / {
> access_log /tmp/test.log test_log;
> set $origin_ip $upstream_http_content_type;
>
> proxy_pass http://127.0.0.1:6060;
> }

Directive "set" executes at rewrite phase, before proxy even
starts working. As a result $origin_ip will be empty.

Maxim Dounin

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

Re: gzip just fails

Paul Roland wrote:

> Hey, I've tried kind of everything
> but it seems like nginx just won't gzip.

> Any ideas?

check error.log or debug error.log if not clear up

> default_type application/octet-stream;

> gzip_types text/plain text/css application/x-javascript text/xml application/xml;

> gzip_disable "MSIE [1-6]\.";

--
Best regards,
Gena

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

Re: I'm confused about the parameter in http{} , my example is here

Hi,

They are documented so you can find them here

http://wiki.nginx.org/NginxHttpCoreModule

Rgds,

Dinh

rollingsun wrote:
> this config is from a nginx + tomcat5 website ,
>
> server based on
> system : redhat linux
> cpu*8 : ( Intel(R) Xeon(R) CPU E5310 @ 1.60GHz )
> mem : 8G
>
> I don't know how to use these parameters well . and what else should I
> add ? maybe I added something excess ?
> can I find some books to learn about all the parameters and the
> numerical value ?
>
>
> worker_rlimit_nofile 655350;
> events {
> use epoll;
> # worker_connections 8192;
> worker_connections 51200;
> }
> http {
> include mime.types;
> default_type application/octet-stream;
--
Posted via http://www.ruby-forum.com/.

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

Re: Bizarre? Logging: $variable_* vs $upstream_http_*

If this is expected behavior how to I go about passing information when an internal redirect is involved between two different locations.

For example:

Location /u1 {
set $remember $upstream_http_content_type;
proxy_pass http://127.0.0.1:6060;
error_page 404 403 = @error;

}


Location @error {
# recall $remember here, perhaps for logging.
}

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,26404,26405#msg-26405


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

Bizarre? Logging: $variable_* vs $upstream_http_*

Consider this configuration fragment:


log_format test_log 'TEST: [$origin_ip] [$upstream_http_content_type]';

location / {
access_log /tmp/test.log test_log;
set $origin_ip $upstream_http_content_type;

proxy_pass http://127.0.0.1:6060;
}

Why am I seeing this in the log file "test.log"?

TEST: []

Why is set not being loaded with $upstream_http_content_type? Shouldn't I see:

TEST:

Any ideas?

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,26404,26404#msg-26404


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

2009年11月28日星期六

gzip just fails

Hey, I've tried kind of everything but it seems like nginx just won't gzip.

I have this in http zone, no page is gziped, only php ones but that's php's internal compression.
I also receive Transfer-Encoding chunked from server.

Any ideas? this is nginx-0.8.28

include /etc/mime.types;
default_type application/octet-stream;
access_log off;
sendfile on;
gzip on;
gzip_proxied any;
gzip_comp_level 5;
gzip_types text/plain text/css application/x-javascript text/xml application/xml;
gzip_http_version 1.1;
gzip_disable "MSIE [1-6]\.";
server_names_hash_bucket_size 128;
autoindex on;
error_page 404 /btnerror/404.html;
log_not_found off;
server_tokens off;
client_max_body_size 32m;

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

Re: How To Redirect http request to ftp

2009/11/28 Edho P Arief <edhoprima@gmail.com>:
> On Sat, Nov 28, 2009 at 8:08 PM, Mahyuddin Susanto <udienz@gmail.com> wrote:
>> 2009/11/28 Edho P Arief <edhoprima@gmail.com>:
>>
>>> no, you can't do this.
>>>
>>
>> hm.. ic ic.. i try another method
>>
>
> rewrite ^/iso/(.+\.iso)$ ftp://10.10.2.73/iso/$1 permanent;
>

great! it works now!

thanks Edho!

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

Re: How To Redirect http request to ftp

On Sat, Nov 28, 2009 at 8:08 PM, Mahyuddin Susanto <udienz@gmail.com> wrote:
> 2009/11/28 Edho P Arief <edhoprima@gmail.com>:
>
>> no, you can't do this.
>>
>
> hm.. ic ic.. i try another method
>

rewrite ^/iso/(.+\.iso)$ ftp://10.10.2.73/iso/$1 permanent;


--
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org

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

Re: How To Redirect http request to ftp

2009/11/28 Edho P Arief <edhoprima@gmail.com>:

> no, you can't do this.
>

hm.. ic ic.. i try another method

rewrite ^.+\.(iso)$ ftp://10.10.2.73/iso/$1 permanent;

and i still got error, because any request iso files only redirect to
ftp://192.168.1.1/iso

fallen:~$ wget http://10.10.3.243:8080/iso/ubuntu/karmic/ubuntu-9.10-alternate-i386.iso
--2009-11-28
20:08:12--
http://10.10.3.243:8080/iso/ubuntu/karmic/ubuntu-9.10-alternate-i386.iso
Connecting to 10.10.3.243:3128... connected.
Proxy request sent, awaiting response... 301 Moved Permanently
Location: ftp://10.10.2.73/iso/iso [following]
--2009-11-28 20:08:12-- ftp://10.10.2.73/iso/iso
Connecting to 10.10.3.243:3128... connected.
Proxy request sent, awaiting response... 404 Not Found
2009-11-28 20:08:13 ERROR 404: Not Found.


--
udienz (Mahyuddin Susanto)
site = http://blog.udienz.net

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

Re: How To Redirect http request to ftp

On Sat, Nov 28, 2009 at 7:45 PM, Mahyuddin Susanto <udienz@gmail.com> wrote:
> Hello Maxim
>
> 2009/11/28 Maxim Dounin <mdounin@mdounin.ru>:
>> Hello!
>>
>> On Sat, Nov 28, 2009 at 05:58:37PM +0700, Mahyuddin Susanto wrote:
>>
>>> Hello all
>>> I have a problem to configure Nginx, i want to redirect any file iso
>>> from http to ftp. but i don't know how?
>>>
>>> example:
>>> all iso (big file) located at http://fileserver.example.org/iso i want
>>> to redirect any request to ftp://fileserver.example.org/iso
>>>
>>> any solutions?
>>
>> http://wiki.nginx.org/NginxHttpRewriteModule#rewrite
>>
>> Maxim Dounin
>
> i still have a problem. here is my configuration
>
>       location ~* ^.+\.(iso|md5)$ {
>       proxy_pass ftp://192.168.1.1/;
>        proxy_set_header Host $host;
>        proxy_set_header X-Real-IP $remote_addr;

no, you can't do this.

--
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org

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

Re: How To Redirect http request to ftp

Hello Maxim

2009/11/28 Maxim Dounin <mdounin@mdounin.ru>:
> Hello!
>
> On Sat, Nov 28, 2009 at 05:58:37PM +0700, Mahyuddin Susanto wrote:
>
>> Hello all
>> I have a problem to configure Nginx, i want to redirect any file iso
>> from http to ftp. but i don't know how?
>>
>> example:
>> all iso (big file) located at http://fileserver.example.org/iso i want
>> to redirect any request to ftp://fileserver.example.org/iso
>>
>> any solutions?
>
> http://wiki.nginx.org/NginxHttpRewriteModule#rewrite
>
> Maxim Dounin

i still have a problem. here is my configuration

location ~* ^.+\.(iso|md5)$ {
proxy_pass ftp://192.168.1.1/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}

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

Re: Gzipping xhtml pages

Thanks, I didn't think about the content-length. But I'm still having the same problem with larger pages not being gzipped:

e.g.
Browser request:
GET /xhtml.xhtml HTTP/1.1
Host: www.domain.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 (.NET CLR 3.5.30729)
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-gb,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Authorization: Basic password

Response:
HTTP/1.1 200 OK
Server: nginx
Date: Sat, 28 Nov 2009 11:44:22 GMT
Content-Type: application/xhtml+xml
Connection: keep-alive
Content-Length: 732
Last-Modified: Sat, 28 Nov 2009 09:38:10 GMT
Accept-Ranges: bytes

I forgot to mention what version of Nginx I'm running - it's
nginx/0.7.6. Also, my webhost runs Nginx on the front end, which proxies requests to my installation of Nginx. I don't know if this would make any difference (I did check it was my installation that was gzipping the css and js by turning off gzip and then checking if the css and js were still being gzipped or not, and they weren't, so my installation can definitely gzip files okay, just seems like it won't gzip application/xhtml+xml files).

Thanks

Dave

Re: How To Redirect http request to ftp

Hello!

On Sat, Nov 28, 2009 at 05:58:37PM +0700, Mahyuddin Susanto wrote:

> Hello all
> I have a problem to configure Nginx, i want to redirect any file iso
> from http to ftp. but i don't know how?
>
> example:
> all iso (big file) located at http://fileserver.example.org/iso i want
> to redirect any request to ftp://fileserver.example.org/iso
>
> any solutions?

http://wiki.nginx.org/NginxHttpRewriteModule#rewrite

Maxim Dounin

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

How To Redirect http request to ftp

Hello all
I have a problem to configure Nginx, i want to redirect any file iso
from http to ftp. but i don't know how?

example:
all iso (big file) located at http://fileserver.example.org/iso i want
to redirect any request to ftp://fileserver.example.org/iso

any solutions?

--
------------------------------------------------------------------
udienz (Mahyuddin Susanto)
site = http://blog.udienz.net

"The best way to predict the future is to create it!" Jason Kaufmann

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

Re: "X-Accel-Redirect" and Wordpress MU solution

@Jeff

I moved ur patched codes (for blog.php) file towards the end - just before readfile() function and it worked much better.

Earlier files were being served through nginx server every time since we were making exit before "Conditional GET" codes.

Now with this change I am able to get "304 Not Modified" as per my expectation (example you can see below)
HTTP/1.1 304 Not Modified
Server: nginx/0.7.62
Date: Sat, 28 Nov 2009 08:12:07 GMT
Connection: keep-alive
X-Powered-By: PHP/5.2.10-2ubuntu6
Content-Length: 27429
Last-Modified: Sun, 22 Nov 2009 20:58:54 GMT
Expires: Mon, 28 Jan 2013 17:58:47 GMT

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,25901,26206#msg-26206


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

Re: "X-Accel-Redirect" and Wordpress MU solution

> you can configure the expires via
> http://wiki.nginx.org/NginxHttpHeadersModule#expires

I did it and it worked.

But then I moved following 3 lines above "X-Accel-Redirect" code block in wordpress' blogs.php

@header( "Last-Modified: $last_modified GMT" );
@header( 'ETag: ' . $etag );
@header( 'Expires: ' . gmdate('D, d M Y H:i:s', time() + 100000000) . ' GMT' );

and it worked too. I received following response.

HTTP/1.1 200 OK
Server: nginx/0.7.62
Date: Sat, 28 Nov 2009 08:00:11 GMT
Content-Type: image/jpeg
Content-Length: 27429
Last-Modified: Sun, 22 Nov 2009 20:58:54 GMT
Connection: keep-alive
Expires: Mon, 28 Jan 2013 17:46:51 GMT
Accept-Ranges: bytes

(Note: "Last Modified" line was present before above change)

I also found this particular thread very useful - http://marc.info/?l=nginx&m=120127279110733&w=2
and based on that only change nginx needs in its core is to add "Etag" header in ignore-list of "X-Accel-Redirect" code.

I may be wrong as this is my 6th day (only) on nginx and I never gone this far with my X (Apache) ;-)

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,25901,26205#msg-26205


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

2009年11月27日星期五

Re: Why does Nginx log same request two times?

Thanks Jimmy,

The problem has been solved by adding "buffer=32k" for access_log
http://wiki.nginx.org/NginxHttpLogModule#access_log

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,26189,26201#msg-26201


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

Re: Why does Nginx log same request two times?

Hi,

Have you tested to see if the problem happens on the exact same os version?

Jimmy

rayallenwu wrote:
> The config files are same. I copy & paste from one to another one.
>
> Nginx version is same as well. Nginx 0.7.63 for windows
>
> OS is Windows 2003. There is few difference. The abnormal one is 2003 enterprise version while the normal one is standard version.
>
> Posted at Nginx Forum: http://forum.nginx.org/read.php?2,26189,26199#msg-26199
>
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://nginx.org/mailman/listinfo/nginx
>

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

Re: Why does Nginx log same request two times?

The config files are same. I copy & paste from one to another one.

Nginx version is same as well. Nginx 0.7.63 for windows

OS is Windows 2003. There is few difference. The abnormal one is 2003 enterprise version while the normal one is standard version.

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,26189,26199#msg-26199


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

Re: How to block these requests with http:// in the params?

I have a webserver W hosting photos to which i refer from websites A and B. So, i have same photos on websites A and B. What i'd like to do is display one specific photo instead of current images on website B. Can this be done with nginx ? Thanks in advance.

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,25213,26198#msg-26198


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

Re: Why does Nginx log same request two times?

Hi,

Sorry I don't want to be redundant. But are the versions(os and servers)
on the two servers the same?

I don't know the equivalent on windows, but on linux I would use the
diff command to compare the configurations.

If the servers are the same have you used the equivalent 'diff' command
to compare the configurations?

Jimmy

rayallenwu wrote:
> Thanks Jimmy,
>
> It seems not double requests. Although every request shows twice in Nginx's log, in my backend (Tomcat)'s log, only 1 record for each request.
>
> So I guess, my server doesn't received double requests, but just Nginx outputs logs double times.
>
> The weird thing is in one of my Windows 2003 server the log is normal but in my another one, the log shows two times. The config files and code are totally same.
>
> The only difference might be the versions of Windows 2003. It's really confused.
>
> --
> Allen
>
> Posted at Nginx Forum: http://forum.nginx.org/read.php?2,26189,26194#msg-26194
>
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://nginx.org/mailman/listinfo/nginx
>

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

I'm confused about the parameter in http{} , my example is here

this config is from a nginx + tomcat5 website ,

server based on
system : redhat linux
cpu*8 : ( Intel(R) Xeon(R) CPU E5310 @ 1.60GHz )
mem : 8G

I don't know how to use these parameters well . and what else should I add ? maybe I added something excess ?
can I find some books to learn about all the parameters and the numerical value ?


worker_rlimit_nofile 655350;
events {
use epoll;
# worker_connections 8192;
worker_connections 51200;
}
http {
include mime.types;
default_type application/octet-stream;

server_names_hash_bucket_size 128;

client_header_buffer_size 32k;
large_client_header_buffers 4 32k;

access_log off;
server_tokens off;

sendfile on;
send_timeout 3m;
tcp_nopush on;
keepalive_timeout 65;

expires 30m;
tcp_nodelay on;

gzip on;
gzip_comp_level 2;
gzip_proxied any;
gzip_types text/plain application/x-javascript text/css text/html application/xml;
gzip_min_length 1100;
gzip_buffers 4 8k;
gzip_http_version 1.1;
output_buffers 1 32k;
postpone_output 1460;

reset_timedout_connection on;
client_max_body_size 30m;
client_body_buffer_size 256k;
client_body_temp_path /web/nginx/client_body_temp;
proxy_temp_path /web/nginx/proxy_temp;
proxy_hide_header Cache-Control;


server {

......

also the tomcat config is here

CATALINA_OPTS='-Xms800M -Xmx1536M'

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,26195,26195#msg-26195


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

Re: Why does Nginx log same request two times?

Thanks Jimmy,

It seems not double requests. Although every request shows twice in Nginx's log, in my backend (Tomcat)'s log, only 1 record for each request.

So I guess, my server doesn't received double requests, but just Nginx outputs logs double times.

The weird thing is in one of my Windows 2003 server the log is normal but in my another one, the log shows two times. The config files and code are totally same.

The only difference might be the versions of Windows 2003. It's really confused.

--
Allen

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,26189,26194#msg-26194


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

Re: Why does Nginx log same request two times?

Hi,

Double requests are little complicated.

Can you repeat the error with other OS's/browsers?

Thanks,

Jimmy

rayallenwu wrote:
> In my log files, every http request shows double times.
>
> 122.193.13.10 - - [27/Nov/2009:13:39:46 +0800] "GET /images/fanfou.gif HTTP/1.1" 200 149 "http://www.xxx.com" "Mozilla/4.0..."
> 122.193.13.10 - - [27/Nov/2009:13:39:46 +0800] "GET /images/fanfou.gif HTTP/1.1" 200 149 "http://www.xxx.com" "Mozilla/4.0..."
>
> I'm using Nginx 0.7.63 on windows 2003. The problem doesn't occur on windows xp with the same config file and code.
>
> So, does it mean that client sends double requests or this is just an bug of Nginx's logger module?
>
> Thanks
>
> Posted at Nginx Forum: http://forum.nginx.org/read.php?2,26189,26189#msg-26189
>
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://nginx.org/mailman/listinfo/nginx
>

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

Why does Nginx log same request two times?

In my log files, every http request shows double times.

122.193.13.10 - - [27/Nov/2009:13:39:46 +0800] "GET /images/fanfou.gif HTTP/1.1" 200 149 "http://www.xxx.com" "Mozilla/4.0..."
122.193.13.10 - - [27/Nov/2009:13:39:46 +0800] "GET /images/fanfou.gif HTTP/1.1" 200 149 "http://www.xxx.com" "Mozilla/4.0..."

I'm using Nginx 0.7.63 on windows 2003. The problem doesn't occur on windows xp with the same config file and code.

So, does it mean that client sends double requests or this is just an bug of Nginx's logger module?

Thanks

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,26189,26189#msg-26189


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

Re: Improvements to geoip module

I recreated the patch on 0.8.28 and uploaded it to http://xenon.stanford.edu/~arvind/ngx_http_geoip_module.c-patch.txt

(Not sure how to preserve formatting in pasting to this board and I don't see an upload mechanism).

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,14194,26151#msg-26151


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

Re: "X-Accel-Redirect" and Wordpress MU solution

On Nov 27, 2009, at 12:05 PM, rahul286 wrote:
>
> I did it and it worked like a charm!
>
> I have one question though. I see your patch had 'exit' before sending following headers.
>
> @header( "Last-Modified: $last_modified GMT" );
> @header( 'ETag: ' . $etag );
> @header( 'Expires: ' . gmdate('D, d M Y H:i:s', time() + 100000000) . ' GMT' );
>
> I modified code to send above headers, but it didn't worked well.
>
> I guess above headers if successfully sent will further enhance performance.
> If "client has file cached" server can return "304 not modified" and a lot of data transfer can be saved!
>
> What do you think? Any way to add atleast "Etag" header?

I think this should be handled by nginx and not your php scripts. Since nginx will be handling the files directly from the filesystem it should send out the Expires and Etag headers.
you can configure the expires via http://wiki.nginx.org/NginxHttpHeadersModule#expires

Rob
_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx

Re: "X-Accel-Redirect" and Wordpress MU solution

Jeff Waugh Wrote:
-------------------------------------------------------
> G'day, from the author of that patch. :-)

Glad to meet you. I just cannot thank you enough for making that great patch.
It saved me and my blog network! :-)

> Here's the relevant configuration snippet I use:
>
> location ^~ /blogs.dir {
> internal;
> alias
> /srv/example.com/root/wp-content/blogs.dir;
> }

I did it and it worked like a charm!

I have one question though. I see your patch had 'exit' before sending following headers.

@header( "Last-Modified: $last_modified GMT" );
@header( 'ETag: ' . $etag );
@header( 'Expires: ' . gmdate('D, d M Y H:i:s', time() + 100000000) . ' GMT' );

I modified code to send above headers, but it didn't worked well.

I guess above headers if successfully sent will further enhance performance.
If "client has file cached" server can return "304 not modified" and a lot of data transfer can be saved!

What do you think? Any way to add atleast "Etag" header?

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,25901,26055#msg-26055


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

Re: Tweaking FastCGI buffers settings

> I did not know about http://wiki.nginx.org/NginxXSendfile.
> It is exactly the same thing I wanted. I tried it after you gave hint to me.
> For some reason it didn't work and resulted in 404 error.
> Is it in nginx core or do I need to enable it from somewhere?

It's in the nginx core. And when you are sending your url back make sure its an absolute url for the server to serve the file. Not a path to the file on the filesystem.

Rob


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

Re: Logging non-cached requests

Thanks for advise, would need to upgrade to 0.8 first )

just checking, is it possible to use this variable in "if" construction and log only misses?

otherwise, even though i can filter them out when viewing logs, i will still get all the static requests logged

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,25600,25914#msg-25914


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

Re: Gzipping xhtml pages

On Fri, Nov 27, 2009 at 01:27:16PM +0000, Dave Kennard wrote:

> I'm having trouble in getting Nginx to gzip my pages that are served as
> application/xhtml+xml
>
> In my nginx.conf http block I have the following:
> / gzip on;
> gzip_comp_level 3;
> gzip_proxied any;
> gzip_types text/plain text/html text/css application/x-javascript
> text/xml application/xml application/xhtml+xml application/xml+rss
> text/javascript;//
>
> /In mime.types I commented out the existing xhtml entry and added
> / application/xhtml+xml xhtml;/
> //
> So a plain text file with .xhtml extension is served with content-type
> application/xhtml+xml, but it is not being gzipped for some reason? CSS
> and javascript are being gzipped okay though.
>
> The response headers for my test xhtml page look like this:
> /HTTP/1.1 200 OK
> Server: nginx
> Date: Fri, 27 Nov 2009 13:23:33 GMT
> Content-Type: application/xhtml+xml
> Connection: keep-alive
> Content-Length: 11
> Last-Modified: Fri, 27 Nov 2009 13:13:42 GMT
> Accept-Ranges: bytes/
>
> Can anyone help me get my pages gzipped with content type header of
> /application/xhtml+xml/?

Because, by default gzip_min_length is 20. The page is too small.


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

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

Gzipping xhtml pages

I'm having trouble in getting Nginx to gzip my pages that are served as application/xhtml+xml

In my nginx.conf http block I have the following:
    gzip  on;
    gzip_comp_level 3;
    gzip_proxied any;
    gzip_types text/plain text/html text/css application/x-javascript text/xml application/xml application/xhtml+xml application/xml+rss text/javascript;


In mime.types I commented out the existing xhtml entry and added
    application/xhtml+xml          xhtml;

So a plain text file with .xhtml extension is served with content-type
application/xhtml+xml, but it is not being gzipped for some reason? CSS and javascript are being gzipped okay though.

The response headers for my test xhtml page look like this:
HTTP/1.1 200 OK
Server: nginx
Date: Fri, 27 Nov 2009 13:23:33 GMT
Content-Type: application/xhtml+xml
Connection: keep-alive
Content-Length: 11
Last-Modified: Fri, 27 Nov 2009 13:13:42 GMT
Accept-Ranges: bytes


Can anyone help me get my pages gzipped with content type header of
application/xhtml+xml?

Thanks

Dave

Re: "X-Accel-Redirect" and Wordpress MU solution

<quote who="rahul286">

> I am trying to get "X-Accel-Redirect" working on my ngnix and Wordpress MU
> server.
>
> I came across this official wordpress thread -
> http://trac.mu.wordpress.org/changeset/1946
>
> I followed it. I added codes in blogs.php. I also defined
> 'WPMU_ACCEL_REDIRECT' as 'true'.

G'day, from the author of that patch. :-)


Here's the relevant configuration snippet I use:

location ^~ /blogs.dir {
internal;
alias /srv/example.com/root/wp-content/blogs.dir;
}

That's all you have to do -> an internal /blogs.dir location, aliased to the
real blogs.dir directory.

Enjoy!

- Jeff

--
Robot Parade http://www.robotparade.com.au/

m. +61 423 989 818 b. http://bethesignal.org/ p. +61 2 9043 2940

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

Re: "X-Accel-Redirect" and Wordpress MU solution

On Fri, Nov 27, 2009 at 03:26:00AM -0500, rahul286 wrote:

> I am trying to get "X-Accel-Redirect" working on my ngnix and Wordpress MU server.
>
> I came across this official wordpress thread - http://trac.mu.wordpress.org/changeset/1946
>
> I followed it. I added codes in blogs.php. I also defined 'WPMU_ACCEL_REDIRECT' as 'true'.
>
> After that I ended in 500 errors. :-(
>
> Then I found this article written in chinese - http://bit.ly/74uWtM
> (english translation - http://bit.ly/89ei5Z)
>
> I also found reason of 500 error to be "redirect loop".
> I followed that chinese bloggers advise and code but ended up in 404 errors.
>
> I think I need to have something correct in ngnix conf files but I failed to figure it out.
> I could not come out of series of 404 and 500 errors.
>
> Can anyone got "X-Accel-Redirect" working with Wordpress MU successfully?

In this configuration:

location /uri1/ {
fastcgi_pass wordpress;
}

location /uri2/ {
internal;
root /path/to/files;
}

a public URL is /uri1/some_file, WordPress should return
"X-Accel-Redirect: /uri2/some_file",
then nginx will send "/path/to/files/uri2/some_file".


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

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

Re: Tweaking FastCGI buffers settings

Hi Igor,

All doubts are clear now.

Thanks. :-)

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,25728,25902#msg-25902


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