2010年10月31日星期日

Re: Debugging another issue

Another snippet of info, here is the raw response returned to the client

HTTP/1.0 200 OK Server: TWS.NET/1.1 Date: Mon, 01 Nov 2010 03:27:26 GMT 


On Sun, Oct 31, 2010 at 12:23 AM, SplitIce <mat999@gmail.com> wrote:
Im receiveing lots of messages like  "error] 32211#0: *1650258 upstream sent no valid HTTP/1.0 header while reading response header from upstream, client: 178.66.174.159, server: , request: "POST /_serv/chat/read HTTP/1.1", upstream: "http://212.117.183.43:80/_serv/chat/read", host: "thewarezscene.org", referrer: "http://thewarezscene.org/chat/""

Its getting on my nerves because I can never reproduce it. This error only appears on the Nginx(2) node and not Nginx(1) Node. The setup is as follows

Nginx(2)[NL Datacenter] -> Nginx(1)[Offsite] -> Mono[Same location as Nginx(1)]

Any ideas, a timeout or connection error?

--
Warez Scene Free Rapidshare Downloads




--
Warez Scene Free Rapidshare Downloads

Re: Rewrite regexp for subdomains

On 31 Out 2010 03h48 WET, nginx-forum@nginx.us wrote:

> It doesn't work. With server_name www.example.org and server_name
> *.example.org my site doesn't redirect blabla.example.org to
> www.example.org

server {
listen [::]:80; # ipv6

server_name www.example.com;
(...)
}

server {
## This is to avoid the spurious if for sub-domain name
## rewriting. See http://wiki.nginx.org/Pitfalls#Server_Name.
listen [::]:80; # ipv6
server_name *.example.com;
rewrite ^ $scheme://www.example.com$request_uri permanent;
} # server domain rewrite.

I haven't tried it myself. Try it.

--- appa


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

Socket address relative to prefix

Hi there.

I'm using nginx (v0.8.53 on Arch Linux) for web application development
and testing, and I've encountered a problem. I'll specify the problem
first and then explain why I ran into it.

Problem:
Is there a way to specify a unix socket address (as in "fcgi_pass
unix:/path/to/socket") relative to nginx prefix? I've tried using
"fcgi_pass: unix:relative/path", but nginx still interpreted it as
absolute path (is this a bug?).

Rationale:
I'd like to be able to specify socket address relative to prefix because
of the setup I use - I run nginx (as well as php fastcgi) as
non-privileged user and keep all the relevant files inside my home dir.
This is mainly for convenience, so that I don't have to go root
everytime I want to tweak some settings or start and stop servers. I use
only relative paths in nginx.conf, and start nginx with a wrapper script
that sets nginx prefix to the directory it resides in. That way I don't
have to update config files everytime I move (or copy) this directory.

Any suggestions?

Regards,
Radek

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


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

Re: Upload Issues with Nginx Reverse Proxy - Part 2

Hi

I got the same problem as this. but I am using 0.8.53 already. I need a
reverse proxy to upload big files to a backend server and it always got
time out with big files.
I have set the proxy_buffering off already but didnt help. Is there a
way to make it direct upload through nginx already now?

many many thanks

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


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

Re: How to convert apache to nginx rewrite?

Anybody help?

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


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

Re: How to convert apache to nginx rewrite?

I think something using try_files but I dont really understand the rewritecond

On Sun, Oct 31, 2010 at 11:39 PM, dong <nginx-forum@nginx.us> wrote:
Okay...
[code]rewrite ^/cat([0-9]*)\.htm$ index.php?c=$1;
rewrite ^/(forum|.*-vf)([0-9]+)-([0-9]+),([0-9]+)\.htm$
viewforum.php?f=$2&topicdays=$3&start=$4;
rewrite ^/(forum|.*-vf)([0-9]+),([0-9]+)\.htm$
viewforum.php?f=$2&start=$3;
rewrite ^/(forum|.*-vf)([0-9]+)\.htm$ viewforum.php?f=$2;
rewrite ^/prev_topic/([0-9]+)\.htm$ viewtopic.php?t=$1&view=previous;
rewrite ^/next_topic/([0-9]+)\.htm$ viewtopic.php?t=$1&view=next;
rewrite
^/(topics[0-9]*/)?(.*-vt)?([0-9]+)-([0-9]+)-([a-zA-Z]+),([0-9]+)\.htm$
viewtopic.php?t=$3&postdays=$4&postorder=$5&start=$6;
rewrite
^/(topics[0-9]*/)?(.*-vt)?([0-9]+)-([0-9]+)-([a-zA-Z]+)-([a-zA-Z0-9]+),([0-9]+)\.htm$
viewtopic.php?t=$3&start=$7&postdays=$4&postorder=$5&highlight=$6;
rewrite ^/(topics[0-9]*/)?(.*-vt)?([0-9]+),([0-9]+)\.htm$
viewtopic.php?t=$3&start=$4;
rewrite ^/(topics[0-9]*/)?(.*-vt)?([0-9]+)\.htm$ viewtopic.php?t=$3;
rewrite ^/postlink/([0-9]+)\.htm$ viewtopic.php?p=$1;
rewrite ^/search\.htm/authors/(.+),([0-9]+)$
search.php?search_author=$1&start=$2;
rewrite ^/search\.htm/([0-9a-z]+),([0-9]+)$
search.php?search_id=$1&start=$2;
rewrite ^/search\.htm/([0-9a-z]+)$ search.php?search_id=$1;
rewrite ^/members/([a-z]+)_([a-z]*)-([A-Za-z]+),([0-9]+)\.htm$
memberlist.php?letter=$2&mode=$1&order=$3&start=$4;
rewrite ^/members(\.htm|/?)$ memberlist.php;
rewrite ^/profiles/([0-9]+)\.htm$ profile.php?mode=viewprofile&u=$1;
rewrite ^/groups/?([0-9]*)(\.htm)?$ groupcp.php?g=$1;
rewrite ^/groups/?$ groupcp.php;
rewrite ^/sitemap,([0-9]+)\.htm$ sitemap.php?offset=$1;
rewrite ^/topics([0-9]+)/?$ viewforum.php?f=$1.htm;
rewrite ^/(topics|postlink|prev_topic|next_topic)/?$ index.php;
rewrite ^/profiles/?$ memberlist.php;
rewrite ^/(.+)\.htm(\?.*)? /$1.php$2;
rewrite ^/(.+)\.php(\?.*)? /$1.htm$2;
[/code]

But I dont know how translate RewriteCond?

And this rewrite dont working in 100%.
http://www.landwirtschafts.net/cat4.htm - working
http://www.landwirtschafts.net/portal.htm - dont working
http://www.landwirtschafts.net/index.htm - dont working
http://www.landwirtschafts.net/members.htm - dont working

How to fix it?

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


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



--
Warez Scene Free Rapidshare Downloads

Re: How to convert apache to nginx rewrite?

Okay...
[code]rewrite ^/cat([0-9]*)\.htm$ index.php?c=$1;
rewrite ^/(forum|.*-vf)([0-9]+)-([0-9]+),([0-9]+)\.htm$
viewforum.php?f=$2&topicdays=$3&start=$4;
rewrite ^/(forum|.*-vf)([0-9]+),([0-9]+)\.htm$
viewforum.php?f=$2&start=$3;
rewrite ^/(forum|.*-vf)([0-9]+)\.htm$ viewforum.php?f=$2;
rewrite ^/prev_topic/([0-9]+)\.htm$ viewtopic.php?t=$1&view=previous;
rewrite ^/next_topic/([0-9]+)\.htm$ viewtopic.php?t=$1&view=next;
rewrite
^/(topics[0-9]*/)?(.*-vt)?([0-9]+)-([0-9]+)-([a-zA-Z]+),([0-9]+)\.htm$
viewtopic.php?t=$3&postdays=$4&postorder=$5&start=$6;
rewrite
^/(topics[0-9]*/)?(.*-vt)?([0-9]+)-([0-9]+)-([a-zA-Z]+)-([a-zA-Z0-9]+),([0-9]+)\.htm$
viewtopic.php?t=$3&start=$7&postdays=$4&postorder=$5&highlight=$6;
rewrite ^/(topics[0-9]*/)?(.*-vt)?([0-9]+),([0-9]+)\.htm$
viewtopic.php?t=$3&start=$4;
rewrite ^/(topics[0-9]*/)?(.*-vt)?([0-9]+)\.htm$ viewtopic.php?t=$3;
rewrite ^/postlink/([0-9]+)\.htm$ viewtopic.php?p=$1;
rewrite ^/search\.htm/authors/(.+),([0-9]+)$
search.php?search_author=$1&start=$2;
rewrite ^/search\.htm/([0-9a-z]+),([0-9]+)$
search.php?search_id=$1&start=$2;
rewrite ^/search\.htm/([0-9a-z]+)$ search.php?search_id=$1;
rewrite ^/members/([a-z]+)_([a-z]*)-([A-Za-z]+),([0-9]+)\.htm$
memberlist.php?letter=$2&mode=$1&order=$3&start=$4;
rewrite ^/members(\.htm|/?)$ memberlist.php;
rewrite ^/profiles/([0-9]+)\.htm$ profile.php?mode=viewprofile&u=$1;
rewrite ^/groups/?([0-9]*)(\.htm)?$ groupcp.php?g=$1;
rewrite ^/groups/?$ groupcp.php;
rewrite ^/sitemap,([0-9]+)\.htm$ sitemap.php?offset=$1;
rewrite ^/topics([0-9]+)/?$ viewforum.php?f=$1.htm;
rewrite ^/(topics|postlink|prev_topic|next_topic)/?$ index.php;
rewrite ^/profiles/?$ memberlist.php;
rewrite ^/(.+)\.htm(\?.*)? /$1.php$2;
rewrite ^/(.+)\.php(\?.*)? /$1.htm$2;
[/code]

But I dont know how translate RewriteCond?

And this rewrite dont working in 100%.
http://www.landwirtschafts.net/cat4.htm - working
http://www.landwirtschafts.net/portal.htm - dont working
http://www.landwirtschafts.net/index.htm - dont working
http://www.landwirtschafts.net/members.htm - dont working

How to fix it?

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


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

Re: How to convert apache to nginx rewrite?

Its easy e.g the first one is
rewrite ^cat([0-9]*)\.htm$ index.php?c=$1;

On Sun, Oct 31, 2010 at 8:54 PM, dong <nginx-forum@nginx.us> wrote:
Its rewrite for phpBB mod - przemo.org.

[code]RewriteEngine on

#RewriteBase /forum

RewriteRule ^cat([0-9]*)\.htm$ ./index.php?c=$1 [L,QSA]
#
RewriteRule ^(forum|.*-vf)([0-9]+)-([0-9]+),([0-9]+)\.htm$
./viewforum.php?f=$2&topicdays=$3&start=$4 [L,QSA]
RewriteRule ^(forum|.*-vf)([0-9]+),([0-9]+)\.htm$
./viewforum.php?f=$2&start=$3 [L,QSA]
RewriteRule ^(forum|.*-vf)([0-9]+)\.htm$ ./viewforum.php?f=$2 [L,QSA]

RewriteRule ^prev_topic/([0-9]+)\.htm$
./viewtopic.php?t=$1&view=previous [L,QSA]
RewriteRule ^next_topic/([0-9]+)\.htm$ ./viewtopic.php?t=$1&view=next
[L,QSA]
#
#
RewriteRule
^(topics[0-9]*/)?(.*-vt)?([0-9]+)-([0-9]+)-([a-zA-Z]+),([0-9]+)\.htm$
./viewtopic.php?t=$3&postdays=$4&postorder=$5&start=$6 [L,QSA]
RewriteRule
^(topics[0-9]*/)?(.*-vt)?([0-9]+)-([0-9]+)-([a-zA-Z]+)-([a-zA-Z0-9]+),([0-9]+)\.htm$
./viewtopic.php?t=$3&start=$7&postdays=$4&postorder=$5&highlight=$6
[L,QSA]
#
RewriteRule ^(topics[0-9]*/)?(.*-vt)?([0-9]+),([0-9]+)\.htm$
./viewtopic.php?t=$3&start=$4 [L,QSA]
RewriteRule ^(topics[0-9]*/)?(.*-vt)?([0-9]+)\.htm$ ./viewtopic.php?t=$3
[L,QSA]
RewriteRule ^postlink/([0-9]+)\.htm$ ./viewtopic.php?p=$1 [L,QSA]

RewriteRule ^search\.htm/authors/(.+),([0-9]+)$
./search.php?search_author=$1&start=$2 [L,QSA]
#
RewriteRule ^search\.htm/([0-9a-z]+),([0-9]+)$
./search.php?search_id=$1&start=$2 [L,QSA]
RewriteRule ^search\.htm/([0-9a-z]+)$ ./search.php?search_id=$1 [L,QSA]

#
#
RewriteRule ^members/([a-z]+)_([a-z]*)-([A-Za-z]+),([0-9]+)\.htm$
./memberlist.php?letter=$2&mode=$1&order=$3&start=$4 [L,QSA]
RewriteRule ^members(\.htm|/?)$ ./memberlist.php [L,QSA]

RewriteRule ^profiles/([0-9]+)\.htm$ ./profile.php?mode=viewprofile&u=$1
[L,QSA]

RewriteRule ^groups/?([0-9]*)(\.htm)?$ ./groupcp.php?g=$1 [L,QSA]
RewriteRule ^groups/?$ ./groupcp.php [L,QSA]

#
RewriteRule ^sitemap,([0-9]+)\.htm$ ./sitemap.php?offset=$1 [L,QSA]

RewriteRule ^topics([0-9]+)/?$ ./viewforum.php?f=$1.htm [L,QSA]
RewriteRule ^(topics|postlink|prev_topic|next_topic)/?$ ./index.php
[L,QSA]
RewriteRule ^profiles/?$ ./memberlist.php [L,QSA]

#htm to php
RewriteCond   %{REQUEST_FILENAME} !-f
RewriteCond   %{REQUEST_FILENAME} (.*)\.htm
RewriteRule   ^(.+)\.htm(\?.*)? $1.php$2 [E=WasHTML:yes]
RewriteCond   %{ENV:WasHTML} ^yes$
RewriteCond   %{REQUEST_FILENAME} !-f
RewriteRule   ^(.+)\.php(\?.*)? $1.htm$2
[/code]

Can anybody help me to translate this to nginx rewrite?

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


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



--
Warez Scene Free Rapidshare Downloads

How to convert apache to nginx rewrite?

Its rewrite for phpBB mod - przemo.org.

[code]RewriteEngine on

#RewriteBase /forum

RewriteRule ^cat([0-9]*)\.htm$ ./index.php?c=$1 [L,QSA]
#
RewriteRule ^(forum|.*-vf)([0-9]+)-([0-9]+),([0-9]+)\.htm$
./viewforum.php?f=$2&topicdays=$3&start=$4 [L,QSA]
RewriteRule ^(forum|.*-vf)([0-9]+),([0-9]+)\.htm$
./viewforum.php?f=$2&start=$3 [L,QSA]
RewriteRule ^(forum|.*-vf)([0-9]+)\.htm$ ./viewforum.php?f=$2 [L,QSA]

RewriteRule ^prev_topic/([0-9]+)\.htm$
./viewtopic.php?t=$1&view=previous [L,QSA]
RewriteRule ^next_topic/([0-9]+)\.htm$ ./viewtopic.php?t=$1&view=next
[L,QSA]
#
#
RewriteRule
^(topics[0-9]*/)?(.*-vt)?([0-9]+)-([0-9]+)-([a-zA-Z]+),([0-9]+)\.htm$
./viewtopic.php?t=$3&postdays=$4&postorder=$5&start=$6 [L,QSA]
RewriteRule
^(topics[0-9]*/)?(.*-vt)?([0-9]+)-([0-9]+)-([a-zA-Z]+)-([a-zA-Z0-9]+),([0-9]+)\.htm$
./viewtopic.php?t=$3&start=$7&postdays=$4&postorder=$5&highlight=$6
[L,QSA]
#
RewriteRule ^(topics[0-9]*/)?(.*-vt)?([0-9]+),([0-9]+)\.htm$
./viewtopic.php?t=$3&start=$4 [L,QSA]
RewriteRule ^(topics[0-9]*/)?(.*-vt)?([0-9]+)\.htm$ ./viewtopic.php?t=$3
[L,QSA]
RewriteRule ^postlink/([0-9]+)\.htm$ ./viewtopic.php?p=$1 [L,QSA]

RewriteRule ^search\.htm/authors/(.+),([0-9]+)$
./search.php?search_author=$1&start=$2 [L,QSA]
#
RewriteRule ^search\.htm/([0-9a-z]+),([0-9]+)$
./search.php?search_id=$1&start=$2 [L,QSA]
RewriteRule ^search\.htm/([0-9a-z]+)$ ./search.php?search_id=$1 [L,QSA]

#
#
RewriteRule ^members/([a-z]+)_([a-z]*)-([A-Za-z]+),([0-9]+)\.htm$
./memberlist.php?letter=$2&mode=$1&order=$3&start=$4 [L,QSA]
RewriteRule ^members(\.htm|/?)$ ./memberlist.php [L,QSA]

RewriteRule ^profiles/([0-9]+)\.htm$ ./profile.php?mode=viewprofile&u=$1
[L,QSA]

RewriteRule ^groups/?([0-9]*)(\.htm)?$ ./groupcp.php?g=$1 [L,QSA]
RewriteRule ^groups/?$ ./groupcp.php [L,QSA]

#
RewriteRule ^sitemap,([0-9]+)\.htm$ ./sitemap.php?offset=$1 [L,QSA]

RewriteRule ^topics([0-9]+)/?$ ./viewforum.php?f=$1.htm [L,QSA]
RewriteRule ^(topics|postlink|prev_topic|next_topic)/?$ ./index.php
[L,QSA]
RewriteRule ^profiles/?$ ./memberlist.php [L,QSA]

#htm to php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} (.*)\.htm
RewriteRule ^(.+)\.htm(\?.*)? $1.php$2 [E=WasHTML:yes]
RewriteCond %{ENV:WasHTML} ^yes$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.+)\.php(\?.*)? $1.htm$2
[/code]

Can anybody help me to translate this to nginx rewrite?

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


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

Re: nginx on host + nginx in jail - how to setup two servers?

server {
        listen frontend:80 default_server;
        proxy_intercept_errors on;
        location / {
        proxy_pass        http://backend;
        proxy_set_header  X-Real-IP  $remote_addr;
        proxy_set_header Host $http_host;
        }
}

On Sun, Oct 31, 2010 at 6:14 AM, dong <nginx-forum@nginx.us> wrote:
How to set proxy_pass? When I set NAT in pf.conf then sites from nginx
on my host dont working, but sites from jail is working :)

Its my pf.conf now:
rdr pass on em0 proto tcp from any to em0 port 80 -> 192.168.1.3 port
80
nat on em0 from 192.168.1.0/24 to any -> 188.x.x.x

192.168.1.3 - its my jail
188.x.x.x its my host

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


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



--
Warez Scene Free Rapidshare Downloads

2010年10月30日星期六

Re: Rewrite regexp for subdomains

It doesn't work. With server_name www.example.org and server_name
*.example.org my site doesn't redirect blabla.example.org to
www.example.org

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


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

Re: Rewrite regexp for subdomains

On 30 Out 2010 19h08 WEST, nginx-forum@nginx.us wrote:

> Hi i need to blabla.example.org or dummy.example.org anotherdummy
> send me to www.example.org (another words *.example.org must
> redirect to www.example.org) but when i type www.example.org it
> can't send to www.example.org cause it's loop. Help me to realize
> this construction.

Create two server blocks. Put the www server name before the * and it
should work:

See http://nginx.org/en/docs/http/server_names.html

Exact names precede patterns or regex server names.

--- appa


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

Re: nginx on host + nginx in jail - how to setup two servers?

How to set proxy_pass? When I set NAT in pf.conf then sites from nginx
on my host dont working, but sites from jail is working :)

Its my pf.conf now:
rdr pass on em0 proto tcp from any to em0 port 80 -> 192.168.1.3 port
80
nat on em0 from 192.168.1.0/24 to any -> 188.x.x.x

192.168.1.3 - its my jail
188.x.x.x its my host

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


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

Rewrite regexp for subdomains

Hi i need to blabla.example.org or dummy.example.org anotherdummy send
me to www.example.org (another words *.example.org must redirect to
www.example.org) but when i type www.example.org it can't send to
www.example.org cause it's loop. Help me to realize this construction.

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


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

Re: nginx on host + nginx in jail - how to setup two servers?

I run a similar setup, its not hard. just proxy_pass on the outermost server.

On Sun, Oct 31, 2010 at 12:59 AM, Ian Hobson <ian.hobson@ntlworld.com> wrote:
On 29/10/2010 18:26, dong wrote:
I have one nginx server on my host, whose connected to internet. I have
second nginx in jail, whose has nonroutable ip. I want:

nginx jail --->  nginx host --->  internet (world)

How I can setup this? Proxy or sth?
If you really want to run nginx on both machines, then you need to set up a normal install in the jail machine, and a reverse proxy configuration on the firewall.

If you can serve all your content from the "jail" version, then you don't need the version on the firewall.  Simply port forward port 80 to the port and ip of the "jail" machine.  I think you only need to forward TCP. If you are using https then you will need to forward that port also.

Regards

Ian



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



--
Warez Scene Free Rapidshare Downloads

Re: nginx on host + nginx in jail - how to setup two servers?

On 29/10/2010 18:26, dong wrote:
> I have one nginx server on my host, whose connected to internet. I have
> second nginx in jail, whose has nonroutable ip. I want:
>
> nginx jail ---> nginx host ---> internet (world)
>
> How I can setup this? Proxy or sth?
If you really want to run nginx on both machines, then you need to set
up a normal install in the jail machine, and a reverse proxy
configuration on the firewall.

If you can serve all your content from the "jail" version, then you
don't need the version on the firewall. Simply port forward port 80 to
the port and ip of the "jail" machine. I think you only need to forward
TCP. If you are using https then you will need to forward that port also.

Regards

Ian


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

Debugging another issue

Im receiveing lots of messages like  "error] 32211#0: *1650258 upstream sent no valid HTTP/1.0 header while reading response header from upstream, client: 178.66.174.159, server: , request: "POST /_serv/chat/read HTTP/1.1", upstream: "http://212.117.183.43:80/_serv/chat/read", host: "thewarezscene.org", referrer: "http://thewarezscene.org/chat/""

Its getting on my nerves because I can never reproduce it. This error only appears on the Nginx(2) node and not Nginx(1) Node. The setup is as follows

Nginx(2)[NL Datacenter] -> Nginx(1)[Offsite] -> Mono[Same location as Nginx(1)]

Any ideas, a timeout or connection error?

--
Warez Scene Free Rapidshare Downloads

Re: proxy-cache refresh

Thanks for your answer Maxim!

Most important for us is that files disappear from the cache within 60
min after deletion from the origins
So, I think for us the best way to go at the moment is to us the
cache_purge module in order to delete files from the cache after they
have been delete from the origin as setting the expire time at 60 min is
not a good option for us.

Kind regards,
Nik

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


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

Re: cpu spike on HUP

On 10/29/2010 11:07 PM, Igor Sysoev wrote:
>> I just sent a HUP signal to nginx and the cpu shot up to 55% user and
>> another 10% sys.
> Do you send a HUP signal to master process only or to worker processes too ?
>

I sent the HUP signal to the master process.

-gary

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

How to setup nginx with Gmail IMAP?

Hi,
  I am new to Nginx.  Does anyone have any example on how to setup nginx with both gmail imap and yahoo imap?  There will be multiple users using this proxy.  Thanks.

2010年10月29日星期五

Re: GZIP Issues in 0.7 vx 0.8

On Fri, Oct 29, 2010 at 06:47:20PM -0400, Kevin wrote:

> I ran into an issue the last couple days where we noticed some files
> were being gzipped from a site (in a reverse proxy config) and others
> were not. Initially we believed it to be due to the size of the buffer
> so we increased it, enormously. Yet, no resolution.
>
> We tried buffering, caching, compression levels, vary any, proxied, etc.
> We simply couldn't find the issue. We went with a hail mary and built
> 0.8 (newest) and the issue is now resolved.
>
> Is there a bug or an issue with 0.7 and gzip in a reverse proxy config
> vs 0.8? Apparently there is something but I wanted to point out we ran
> into this issue. We can also provide configs to duplicate this problem.
>
> One last thing:
> There was not a gzip_disable string, no changes in mime.types, even
> removed all settings except gzip on;. This issue occurred with both gzip
> 1.1/1.0.

As far as I remember there should not be changes.
Could you show a debug log of non-gzipped response on 0.7 ?


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

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

Re: cpu spike on HUP

On Fri, Oct 29, 2010 at 02:02:29PM -0700, Gary Barrueto wrote:

> On 10/29/2010 01:02 AM, Igor Sysoev wrote:
> > On Thu, Oct 28, 2010 at 04:55:40PM -0700, Gary Barrueto wrote:
> >
> >> Whenever nginx is sent a HUP signal, the cpu jumps to 100% then slowly
> >> drops until all the nginx worker processes that are trying to shutting
> >> down are done. Those nginx process usually take a while to shutdown
> >> since we're serving very large files (200MB-2GB). Any ideas why this is
> >> happening?
> >>
> >> From the strace below it looks like it all in sendfile but I wouldn't
> >> think that would so cpu intense.
> > What kind of CPU is used in these moments: system or user according to top ?
> >
>
> I just sent a HUP signal to nginx and the cpu shot up to 55% user and
> another 10% sys.

Do you send a HUP signal to master process only or to worker processes too ?


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

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

GZIP Issues in 0.7 vx 0.8

I ran into an issue the last couple days where we noticed some files
were being gzipped from a site (in a reverse proxy config) and others
were not. Initially we believed it to be due to the size of the buffer
so we increased it, enormously. Yet, no resolution.

We tried buffering, caching, compression levels, vary any, proxied, etc.
We simply couldn't find the issue. We went with a hail mary and built
0.8 (newest) and the issue is now resolved.

Is there a bug or an issue with 0.7 and gzip in a reverse proxy config
vs 0.8? Apparently there is something but I wanted to point out we ran
into this issue. We can also provide configs to duplicate this problem.

One last thing:
There was not a gzip_disable string, no changes in mime.types, even
removed all settings except gzip on;. This issue occurred with both gzip
1.1/1.0.

Thanks,
Kevin

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


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

Re: Yet another "No input file specified." thread

Andy if nginx does not run under cygwin?
Thanks
Mike

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


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

Re: cpu spike on HUP

On 10/29/2010 01:02 AM, Igor Sysoev wrote:
> On Thu, Oct 28, 2010 at 04:55:40PM -0700, Gary Barrueto wrote:
>
>> Whenever nginx is sent a HUP signal, the cpu jumps to 100% then slowly
>> drops until all the nginx worker processes that are trying to shutting
>> down are done. Those nginx process usually take a while to shutdown
>> since we're serving very large files (200MB-2GB). Any ideas why this is
>> happening?
>>
>> From the strace below it looks like it all in sendfile but I wouldn't
>> think that would so cpu intense.
> What kind of CPU is used in these moments: system or user according to top ?
>

I just sent a HUP signal to nginx and the cpu shot up to 55% user and
another 10% sys.

-gary

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

Re: Yet another "No input file specified." thread

Hi dmikester1

I'm reposting the reply - it appear the O/P didn't see it and neither
did I.

You put a root stanza in the config file - typically inside the server
{} brackets - but see
http://wiki.nginx.org/NginxHttpCoreModule#root

On windows, I believe you need to convert the file names from - for
example - d:\websites\asite
into d/websites/asite if nginx runs under cygwin

Regards

Ian

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

nginx on host + nginx in jail - how to setup two servers?

I have one nginx server on my host, whose connected to internet. I have
second nginx in jail, whose has nonroutable ip. I want:

nginx jail ---> nginx host ---> internet (world)

How I can setup this? Proxy or sth?

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


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

Re: Yet another "No input file specified." thread

Anyone have any ideas about this one?
Thanks
Mike

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


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

Re: 0.8.35 compile error

On Fri, Oct 29, 2010 at 05:45:26PM +0400, Boris Dolgov wrote:

> On Fri, Oct 29, 2010 at 13:50, Igor Sysoev <igor@sysoev.ru> wrote:
> > On Fri, Oct 29, 2010 at 05:47:44AM -0400, spacereactor wrote:
> >
> >> i using ubuntu 10.10 and install nginx-0.8.53, how do i fix this?
> >>
> >> objs/src/os/unix/ngx_process.o: In function `ngx_process_get_status':
> >> /var/opt/nginx-0.8.53/src/os/unix/ngx_process.c:490: warning:
> >> `sys_errlist' is deprecated; use `strerror' or `strerror_r' instead
> >> /var/opt/nginx-0.8.53/src/os/unix/ngx_process.c:490: warning: `sys_nerr'
> >> is deprecated; use `strerror' or `strerror_r' instead
> >> make[1]: Leaving directory `/var/opt/nginx-0.8.53'
> >
> > http://nginx.org/en/docs/sys_errlist.html
> Looks like you need to write a robot that tries to find "`sys_errlist'
> is deprecated; use `strerror' or `strerror_r' instead" in incoming
> letters and answers them with this link :)

nginx2 will have a builtin error messages list built on on startup.


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

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

Re: 0.8.35 compile error

On Fri, Oct 29, 2010 at 13:50, Igor Sysoev <igor@sysoev.ru> wrote:
> On Fri, Oct 29, 2010 at 05:47:44AM -0400, spacereactor wrote:
>
>> i using ubuntu 10.10 and install nginx-0.8.53, how do i fix this?
>>
>> objs/src/os/unix/ngx_process.o: In function `ngx_process_get_status':
>> /var/opt/nginx-0.8.53/src/os/unix/ngx_process.c:490: warning:
>> `sys_errlist' is deprecated; use `strerror' or `strerror_r' instead
>> /var/opt/nginx-0.8.53/src/os/unix/ngx_process.c:490: warning: `sys_nerr'
>> is deprecated; use `strerror' or `strerror_r' instead
>> make[1]: Leaving directory `/var/opt/nginx-0.8.53'
>
> http://nginx.org/en/docs/sys_errlist.html
Looks like you need to write a robot that tries to find "`sys_errlist'
is deprecated; use `strerror' or `strerror_r' instead" in incoming
letters and answers them with this link :)

--
Boris Dolgov.

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

Re: "limit_req_zone" unknown directive

Hello!

On Fri, Oct 29, 2010 at 07:28:07AM -0400, TAiS46 wrote:

> Maxim Dounin Wrote:
> -------------------------------------------------------
> > Hello!
> >
> > On Fri, Oct 29, 2010 at 06:33:45AM -0400, TAiS46
> > wrote:
> >
> > > i have added to my nginx.conf
> > >
> > > http {
> > > limit_req_zone $binary_remote_addr
> > zone=antiddos:10m rate=10r/s;
> > > }
> > >
> > > And in my site config
> > >
> > > location ~ \.php$ {
> > > #limit_req zone=antiddos burst=5;
> > > }
> > >
> > > But i am only getting the error in the topic.
> > > Here my output of nginx -V
> >
> > [...]
> >
> > Most likely reason is that you've added
> > limit_req_zone outside of
> > http{} block. Please show full config.
>
> user www-data;
> worker_processes 16;
>
> error_log /var/log/nginx/error.log info;
> pid /var/run/nginx.pid;
>
> events {
> worker_connections 2048;
> }
>
> http {
> client_max_body_size 1600m;
> include /etc/nginx/mime.types;
> default_type application/octet-stream;
>
> access_log off;
>
> sendfile on;
> #tcp_nopush on;
>
> keepalive_timeout 0;
> #keepalive_timeout 65;
> tcp_nodelay on;
>
> gzip off;
>
> include /etc/nginx/conf.d/*.conf;
> include /etc/nginx/sites-enabled/*;
>
> limit_req_zone $binary_remote_addr zone=one:10m rate=10r/s;
> }

Most likely you have syntax error in one of your include files,
e.g. extra "}" which moves limit_req_zone outside of http{} block.

Note well: you have to define limit_req_zone before you use it
limit_req, so after fixing syntax error you'll see error message
like

[emerg]: unknown limit_req_zone "one" in ...

I.e. moving limit_req_zone before includes is required.

Maxim Dounin

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

Re: "limit_req_zone" unknown directive

Maxim Dounin Wrote:
-------------------------------------------------------
> Hello!
>
> On Fri, Oct 29, 2010 at 06:33:45AM -0400, TAiS46
> wrote:
>
> > i have added to my nginx.conf
> >
> > http {
> > limit_req_zone $binary_remote_addr
> zone=antiddos:10m rate=10r/s;
> > }
> >
> > And in my site config
> >
> > location ~ \.php$ {
> > #limit_req zone=antiddos burst=5;
> > }
> >
> > But i am only getting the error in the topic.
> > Here my output of nginx -V
>
> [...]
>
> Most likely reason is that you've added
> limit_req_zone outside of
> http{} block. Please show full config.
>
> Maxim Dounin
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://nginx.org/mailman/listinfo/nginx


user www-data;
worker_processes 16;

error_log /var/log/nginx/error.log info;
pid /var/run/nginx.pid;

events {
worker_connections 2048;
}

http {
client_max_body_size 1600m;
include /etc/nginx/mime.types;
default_type application/octet-stream;

access_log off;

sendfile on;
#tcp_nopush on;

keepalive_timeout 0;
#keepalive_timeout 65;
tcp_nodelay on;

gzip off;

include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;

limit_req_zone $binary_remote_addr zone=one:10m rate=10r/s;
}

Tanks, Simon

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


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

Re: server_name '_' and custom error_page

Hello!

On Fri, Oct 29, 2010 at 12:23:20PM +0200, Mark Bekkers wrote:

> Hi,
>
> This is my first time post, hi everybody.
>
> The reason of this post is that I found some Nginx behaviour that I
> don't understand.
> I would like to know if it's a bug or not.
> Version: nginx/0.8.52
>
> I pointed all DNS requests to my Nginx server (using a CNAME wildcard).
> Every none matched server names are handled by the snippit below (a
> fallback server configuration)
>
> server {
> # CONFIG
> server_name _;
>
> # SETTINGS
> listen 80 default;
> root /var/www/host/default/public;
> access_log /var/www/home/log/nginx/default.access.log;
>
> error_page 404 /error_page/404.html;
> location /error_page/ {alias /var/www/home/error_page/; allow
> all; internal;}
>
> }
>
>
> A request to kjhtgfcdh.example.com will be catched by the fallback
> configuration and then serves
> my custom defined 404 because the root directive points to an empy
> directory; thus no file is found.
>
> This way I can inform clients (with a custom error_page) they are
> accessing the wrong host.
>
> But this seemed wrong so I changed it to:
>
> server {
> # CONFIG
> server_name _;
>
> # SETTINGS
> listen 80 default;
> access_log /var/www/home/log/nginx/default.access.log;
>
> error_page 404 /error_page/404.html;
> location /error_page/ {alias /var/www/home/error_page/; allow
> all; internal;}
>
> return 404;
>
> }
>
> This is almost the same, but it has no root directive and a return
> directive.
> This seems the way to do it because it skips the need to look for a
> file in the root and returns with a 404
> immediately, but it doesn't serve my custom error_page. It serves
> the nginx internal 404 document.
>
> So I changed it to:
>
> server {
> # CONFIG
> server_name _;
>
> # SETTINGS
> listen 80 default;
> access_log /var/www/home/log/nginx/default.access.log;
>
> error_page 404 /error_page/404.html;
> location /error_page/ {alias /var/www/home/error_page/; allow
> all; internal;}
>
> location / {
> return 404;
> }
>
> }
>
> Again no root directive but the return directive is wrapped in a
> location block and it DOES
> serve my custom error_page.
>
> My questions:
> Did I found a bug? And if I did; what would be correct behaviour?
> And if I did not; what is the correct behaviour in this context?

Behaviour you see is correct. By adding

return 404;

at server{} level you instructed nginx to generate 404 on every
server rewrite processing. Server rewrites are processed on every
internal redirect, including ones generated by error_page. Thus
something like this happens:

- ...initial request...
- server rewrites: generate 404
- error_page: redirect 404 to your custom /error_page/404.html
(and set flag "we've already done error_page redirection")
- server rewrites: generate 404
- error_page: wow, we've already done error_page redirection and
this resulted in another error, return default error page

Maxim Dounin

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

Re: "limit_req_zone" unknown directive

Hello!

On Fri, Oct 29, 2010 at 06:33:45AM -0400, TAiS46 wrote:

> i have added to my nginx.conf
>
> http {
> limit_req_zone $binary_remote_addr zone=antiddos:10m rate=10r/s;
> }
>
> And in my site config
>
> location ~ \.php$ {
> #limit_req zone=antiddos burst=5;
> }
>
> But i am only getting the error in the topic.
> Here my output of nginx -V

[...]

Most likely reason is that you've added limit_req_zone outside of
http{} block. Please show full config.

Maxim Dounin

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

"limit_req_zone" unknown directive

Hello,

i have added to my nginx.conf

http {
limit_req_zone $binary_remote_addr zone=antiddos:10m rate=10r/s;
}

And in my site config

location ~ \.php$ {
#limit_req zone=antiddos burst=5;
}

But i am only getting the error in the topic.
Here my output of nginx -V

nginx version: nginx/0.8.53
TLS SNI support enabled
configure arguments: --conf-path=/etc/nginx/nginx.conf
--error-log-path=/var/log/nginx/error.log --pid-path=/var/run/nginx.pid
--lock-path=/var/lock/nginx.lock
--http-log-path=/var/log/nginx/access.log
--http-client-body-temp-path=/var/lib/nginx/body
--http-proxy-temp-path=/var/lib/nginx/proxy
--http-fastcgi-temp-path=/var/lib/nginx/fastcgi --with-debug
--with-http_stub_status_module --with-http_flv_module
--with-http_ssl_module --with-http_dav_module
--with-http_stub_status_module
--add-module=src/http/modules/http_secure_download_module
--add-module=src/http/modules/http_upload_module
--add-module=src/http/modules/http_uploadprogress_module

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


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

server_name '_' and custom error_page

Hi,

This is my first time post, hi everybody.

The reason of this post is that I found some Nginx behaviour that I
don't understand.
I would like to know if it's a bug or not.
Version: nginx/0.8.52

I pointed all DNS requests to my Nginx server (using a CNAME wildcard).
Every none matched server names are handled by the snippit below (a
fallback server configuration)

server {
# CONFIG
server_name _;

# SETTINGS
listen 80 default;
root /var/www/host/default/public;
access_log /var/www/home/log/nginx/default.access.log;

error_page 404 /error_page/404.html;
location /error_page/ {alias /var/www/home/error_page/; allow all;
internal;}

}


A request to kjhtgfcdh.example.com will be catched by the fallback
configuration and then serves
my custom defined 404 because the root directive points to an empy
directory; thus no file is found.

This way I can inform clients (with a custom error_page) they are
accessing the wrong host.

But this seemed wrong so I changed it to:

server {
# CONFIG
server_name _;

# SETTINGS
listen 80 default;
access_log /var/www/home/log/nginx/default.access.log;

error_page 404 /error_page/404.html;
location /error_page/ {alias /var/www/home/error_page/; allow all;
internal;}

return 404;

}

This is almost the same, but it has no root directive and a return
directive.
This seems the way to do it because it skips the need to look for a file
in the root and returns with a 404
immediately, but it doesn't serve my custom error_page. It serves the
nginx internal 404 document.

So I changed it to:

server {
# CONFIG
server_name _;

# SETTINGS
listen 80 default;
access_log /var/www/home/log/nginx/default.access.log;

error_page 404 /error_page/404.html;
location /error_page/ {alias /var/www/home/error_page/; allow all;
internal;}

location / {
return 404;
}

}

Again no root directive but the return directive is wrapped in a
location block and it DOES
serve my custom error_page.

My questions:
Did I found a bug? And if I did; what would be correct behaviour?
And if I did not; what is the correct behaviour in this context?


- Mark


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

Wordpress Apache protocol Q.

Hi, all. I have an nginx proxy front serving https requests and it
connects to an Apache back end serving plain old http.

My issue is that all of my Wordpress generated links are coming out as
'http://' and I really need them to be 'https://' for the server URLs. I
can't use a force SSL plugin as the traffic between nginx and Apache
isn't SSL-based.

Any ideas on how to make this happen?

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


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

Re: 0.8.35 compile error

On Fri, Oct 29, 2010 at 05:47:44AM -0400, spacereactor wrote:

> i using ubuntu 10.10 and install nginx-0.8.53, how do i fix this?
>
> objs/src/os/unix/ngx_process.o: In function `ngx_process_get_status':
> /var/opt/nginx-0.8.53/src/os/unix/ngx_process.c:490: warning:
> `sys_errlist' is deprecated; use `strerror' or `strerror_r' instead
> /var/opt/nginx-0.8.53/src/os/unix/ngx_process.c:490: warning: `sys_nerr'
> is deprecated; use `strerror' or `strerror_r' instead
> make[1]: Leaving directory `/var/opt/nginx-0.8.53'

http://nginx.org/en/docs/sys_errlist.html


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

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

Re: 0.8.35 compile error

i using ubuntu 10.10 and install nginx-0.8.53, how do i fix this?

objs/src/os/unix/ngx_process.o: In function `ngx_process_get_status':
/var/opt/nginx-0.8.53/src/os/unix/ngx_process.c:490: warning:
`sys_errlist' is deprecated; use `strerror' or `strerror_r' instead
/var/opt/nginx-0.8.53/src/os/unix/ngx_process.c:490: warning: `sys_nerr'
is deprecated; use `strerror' or `strerror_r' instead
make[1]: Leaving directory `/var/opt/nginx-0.8.53'

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


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

More informations about caching

Hi everybody,

I'm using Nginx as reverse proxy for a long time and i'm currently setting up a cache system using Nginx.
I have a question about the proxy_cache feature.

I want to know what's happen when the cache is full. Is the first object
cached be deleted ?

I want to delete in first, the file with the less hit from the cache (if
the caching going to be full).

Is there a solution ? or something ?

Thank a lot.

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

Re: cpu spike on HUP

On Thu, Oct 28, 2010 at 04:55:40PM -0700, Gary Barrueto wrote:

> Whenever nginx is sent a HUP signal, the cpu jumps to 100% then slowly
> drops until all the nginx worker processes that are trying to shutting
> down are done. Those nginx process usually take a while to shutdown
> since we're serving very large files (200MB-2GB). Any ideas why this is
> happening?
>
> From the strace below it looks like it all in sendfile but I wouldn't
> think that would so cpu intense.

What kind of CPU is used in these moments: system or user according to top ?

> -gary
>
> /usr/local/nginx/sbin/nginx -V
> nginx version: nginx/0.8.52
> built by gcc 4.4.3 (Ubuntu 4.4.3-4ubuntu5)
> TLS SNI support enabled
> configure arguments: --with-http_ssl_module --with-http_flv_module
>
> This is from about 10 seconds of strace of one of the nginx process
> while shutting down.
>
> sudo strace -cp 7087
> Process 7087 attached - interrupt to quit
> ^CProcess 7087 detached
> % time seconds usecs/call calls errors syscall
> ------ ----------- ----------- --------- --------- ----------------
> 99.85 0.071681 139 515 sendfile
> 0.15 0.000110 0 252 epoll_wait
> ------ ----------- ----------- --------- --------- ----------------
> 100.00 0.071791 767 total


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

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

Re: how to get remote_addr in ngix for POP/IMAP with perl module

thanks a lot, Client-IP header worked for me.

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


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

2010年10月28日星期四

cpu spike on HUP

Whenever nginx is sent a HUP signal, the cpu jumps to 100% then slowly
drops until all the nginx worker processes that are trying to shutting
down are done. Those nginx process usually take a while to shutdown
since we're serving very large files (200MB-2GB). Any ideas why this is
happening?

From the strace below it looks like it all in sendfile but I wouldn't
think that would so cpu intense.

-gary

/usr/local/nginx/sbin/nginx -V
nginx version: nginx/0.8.52
built by gcc 4.4.3 (Ubuntu 4.4.3-4ubuntu5)
TLS SNI support enabled
configure arguments: --with-http_ssl_module --with-http_flv_module

This is from about 10 seconds of strace of one of the nginx process
while shutting down.

sudo strace -cp 7087
Process 7087 attached - interrupt to quit
^CProcess 7087 detached
% time seconds usecs/call calls errors syscall
------ ----------- ----------- --------- --------- ----------------
99.85 0.071681 139 515 sendfile
0.15 0.000110 0 252 epoll_wait
------ ----------- ----------- --------- --------- ----------------
100.00 0.071791 767 total


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

Re: reverse proxy and too many temp files

Hello!

On Fri, Oct 29, 2010 at 02:32:13AM +1100, Splitice wrote:

> A large number off buffers would help 250 10mb although that's
> a huge amount of memory so im not so sure!

No, it won't. Responses subject to cache will go to disk anyway.

Maxim Dounin

p.s. Please do not top-post. Thank you.

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

Re: unanswered requests from local host, high load

On Fri, Oct 29, 2010 at 02:27:45AM +1100, Splitice wrote:
> I'm suprised you need so many workers.

I'm not sure if we need that many workers, I just have them. My current
idea is that we hit some limit (max open files?), because I just noticed
that both Apache and nginx did not accept/serve new connections for a
serious amount of time (two minutes or so).

Best regards,
--
Carsten Otto otto@informatik.rwth-aachen.de
LuFG Informatik 2 http://verify.rwth-aachen.de/otto/
RWTH Aachen phone: +49 241 80-21211

Re: reverse proxy and too many temp files

A large number off buffers would help 250 10mb although that's a huge amount of memory so im not so sure!

Sent from my iPod

On 28/10/2010, at 10:44 PM, "roadfox" <nginx-forum@nginx.us> wrote:

> Thanks all for your replies!
>
> So we go out and buy some more disks. I forgot to mention but the temp
> file folder grows to more than 60GB.
> And it must be fast disks as I/O is huge.
>
> Will increasing proxy_buffers help in our case to reduce disk i/o?
> - during cache population
> - if cache is populatet
> And i was wrong above, average file size served is 140MB, largest around
> 2GB.
>
> regards
> Andi
>
> Posted at Nginx Forum: http://forum.nginx.org/read.php?2,145097,145291#msg-145291
>
>
> _______________________________________________
> 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: unanswered requests from local host, high load

I'm suprised you need so many workers.

Sent from my iPod

On 29/10/2010, at 12:49 AM, Carsten Otto <otto@informatik.rwth-aachen.de> wrote:

> Dear list,
>
> I'm running a public mirror server which currently handles about
> 5 GBit/sec with 15.000 concurrent connections and 1400 requests/second.
> We only serve static files and basically all served files are in RAM
> (e.g. the current Mozilla Firefox update).
>
> In high load scenarios nginx sometimes fails to answer simple requests
> in time, even when they originate from localhost. According to
> SmokePing's "HTTP ping", which just GETs/HEADs the static index.html
> file, the time needed for this answer changes dramatically and packet
> loss is involved with up to 17% when the problems occur.
>
> The Apache running in the background did not have this problem for
> queries from localhost. When considering external queries (another
> instance of SmokePing), I see gaps (100% packet loss) for both Apache
> and nginx, where nginx also has packet loss up to 20% and higher
> response times around that time.
>
> If you want I can provide the four snippets of SmokePing graphs.
>
> Configuration:
> nginx 0.8.53, 64 workers, no keepalive, 5000 worker connections, epoll,
> sendfile, tcp_nodelay
> Linux 2.6.26 (Debian), max 131072 open files
> two quadcore Xeons, 60 GByte DDR3, Intel 10 GBit NIC
> 10 TByte StorageTek disk backend
>
> In case you need further information, I'm happy to provide it.
>
> I just increased to 96 workers (as I already wanted, I accidently
> reverted that config today), let's see what happens...
>
> Best regards,
> --
> Carsten Otto otto@informatik.rwth-aachen.de
> LuFG Informatik 2 http://verify.rwth-aachen.de/otto/
> RWTH Aachen phone: +49 241 80-21211
> _______________________________________________
> 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: how to get remote_addr in ngix for POP/IMAP with perl module

Hello!

On Thu, Oct 28, 2010 at 10:59:21AM -0400, moorthi wrote:

> i am running ngnix with perl module for IMAP/POP, but i am not getting
> the source remote address from where user is authenticating.

[...]

> [b]my mailauth.pm handler function on nginx server 192.168.1.1:[/b]
> sub handler {
> my $r = shift;
> $r->header_out("Auth-Status", "OK");
> $r->header_out("Auth-Server", '192.168.1.2');
> $r->header_out("Auth-Port", '143');
> $r->send_http_header("text/html");
> warn 'H: ',$r->remote_addr;
> return OK;
> }
>
> [b]from 192.168.1.3[/b]
> telnet 192.168.1.1 143
> . login user1 pass1
> . OK [CAPABILITY IMAP4 IMAP4rev1 logged in
>
> [b]on 192.168.1.1 tail -f /var/log/nginx/error_log[/b]
> H: [b]127.0.0.1[/b] at /usr/share/nginx/perl/lib/mailauth.pm line 59.
>
> actually i have to get 192.168.1.3
> how to get this remote_addr can u plz help me.

Connection to auth_http server is obviously from nginx, not
client. Client's ip address as seen on nginx mail proxy is
available in Client-IP header.

Maxim Dounin

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

Re: proxy-cache refresh

Hello!

On Thu, Oct 28, 2010 at 09:38:31AM -0400, niwo wrote:

> Hello
>
> We are using the nginx proxy_cache module to cache big media files - per
> default for 24h.
> Is there a way to tell nginx to check regularly on the backend servers
> if the file still exists or was being updated?

Not exactly.

Best aproach currently available is to use

proxy_cache_use_stale updating;

and set lower expire time. This way nginx will re-download file
from backends periodically, while still serving most of the
requests from cache.

Maxim Dounin

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

how to get remote_addr in ngix for POP/IMAP with perl module

hi
i am running ngnix with perl module for IMAP/POP, but i am not getting
the source remote address from where user is authenticating.
[b]my conf:[/b]
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;

log_format main '$remote_addr - $remote_user [$time_local]
$request '
'"$status" $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';

access_log /var/log/nginx/access.log main;
perl_modules perl/lib;
perl_require mailauth.pm;
server {
listen 8880;
location /auth {
perl mailauth::handler;
}
}
}

mail {
auth_http 127.0.0.1:8880/auth;
auth_http_timeout 6000;

pop3_capabilities "TOP" "USER";
imap_capabilities "IMAP4rev1" "UIDPLUS";

server {
listen 110;
protocol pop3;
proxy on;
auth_http_header X-Auth-Port 110;
}
server {
listen 143;
protocol imap;
proxy on;
auth_http_header X-Auth-Port 143;
}
}

[b]my mailauth.pm handler function on nginx server 192.168.1.1:[/b]
sub handler {
my $r = shift;
$r->header_out("Auth-Status", "OK");
$r->header_out("Auth-Server", '192.168.1.2');
$r->header_out("Auth-Port", '143');
$r->send_http_header("text/html");
warn 'H: ',$r->remote_addr;
return OK;
}

[b]from 192.168.1.3[/b]
telnet 192.168.1.1 143
. login user1 pass1
. OK [CAPABILITY IMAP4 IMAP4rev1 logged in

[b]on 192.168.1.1 tail -f /var/log/nginx/error_log[/b]
H: [b]127.0.0.1[/b] at /usr/share/nginx/perl/lib/mailauth.pm line 59.

actually i have to get 192.168.1.3
how to get this remote_addr can u plz help me.

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


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

unanswered requests from local host, high load

Dear list,

I'm running a public mirror server which currently handles about
5 GBit/sec with 15.000 concurrent connections and 1400 requests/second.
We only serve static files and basically all served files are in RAM
(e.g. the current Mozilla Firefox update).

In high load scenarios nginx sometimes fails to answer simple requests
in time, even when they originate from localhost. According to
SmokePing's "HTTP ping", which just GETs/HEADs the static index.html
file, the time needed for this answer changes dramatically and packet
loss is involved with up to 17% when the problems occur.

The Apache running in the background did not have this problem for
queries from localhost. When considering external queries (another
instance of SmokePing), I see gaps (100% packet loss) for both Apache
and nginx, where nginx also has packet loss up to 20% and higher
response times around that time.

If you want I can provide the four snippets of SmokePing graphs.

Configuration:
nginx 0.8.53, 64 workers, no keepalive, 5000 worker connections, epoll,
sendfile, tcp_nodelay
Linux 2.6.26 (Debian), max 131072 open files
two quadcore Xeons, 60 GByte DDR3, Intel 10 GBit NIC
10 TByte StorageTek disk backend

In case you need further information, I'm happy to provide it.

I just increased to 96 workers (as I already wanted, I accidently
reverted that config today), let's see what happens...

Best regards,
--
Carsten Otto otto@informatik.rwth-aachen.de
LuFG Informatik 2 http://verify.rwth-aachen.de/otto/
RWTH Aachen phone: +49 241 80-21211

proxy-cache refresh

Hello

We are using the nginx proxy_cache module to cache big media files - per
default for 24h.
Is there a way to tell nginx to check regularly on the backend servers
if the file still exists or was being updated?

Thanks for your help and kind regards,
Nik

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


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

Re: reverse proxy and too many temp files

Thanks all for your replies!

So we go out and buy some more disks. I forgot to mention but the temp
file folder grows to more than 60GB.
And it must be fast disks as I/O is huge.

Will increasing proxy_buffers help in our case to reduce disk i/o?
- during cache population
- if cache is populatet
And i was wrong above, average file size served is 140MB, largest around
2GB.

regards
Andi

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


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

Re: mail proxy auth_http stats

Hello!

On Thu, Oct 28, 2010 at 02:29:02PM +0530, Naresh V wrote:

> Hi,
>
> Thanks for the explanation - that helped.
>
> Another quick question: supposing I want to scale up my auth_http
> server, what would you recommend? Is the embedded-perl redirector good
> enough?

I usually use proxy_pass to cluster of auth backends in the same
nginx as mail proxy, i.e. something like

mail {
auth_http 127.0.0.1/auth;
...
}

http {
upstream auth_backends {
server ...
server ...
}

server {
listen 127.0.0.1:80;

location = /auth {
proxy_pass http://auth_backends;
}
}
}

Maxim Dounin

p.s. Please do not top-post. Thank you.

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

Re: mail proxy auth_http stats

Hi,

Thanks for the explanation - that helped.

Another quick question: supposing I want to scale up my auth_http
server, what would you recommend? Is the embedded-perl redirector good
enough?


On 27 October 2010 01:53, Maxim Dounin <mdounin@mdounin.ru> wrote:
> Hello!
>
> On Tue, Oct 26, 2010 at 10:34:31PM +0530, Naresh V wrote:
>
>> Hi,
>>
>> I have a mail proxy configured alongside the following:
>>
>> http {
>>         perl_modules /etc/nginx/perl/lib;
>>         perl_require mailauth.pm;   // there's a Perl::DBI call here
>>
>>         server {
>>                 listen 81;
>>                 location /auth {
>>                          perl mailauth::handler;
>>                 }
>>                 location /stats {
>>                          stub_status on;
>>                          access_log off;
>>                 }
>> }
>>
>> and my mail proxy uses this server :81/auth for auth_http
>>
>> when i curl :81/stats, I always get only 1 in writing:
>>
>>
>> Active connections: 149
>> server accepts handled requests
>>  4945 4945 2465
>> Reading: 0 Writing: 1 Waiting: 148
>>
>> I initially thought that this was due to some sort of a limitation of
>> using the embedded-perl interpretor of nginx and so i removed this
>> logic out and served it out of a different nginx+thin+rackup script
>> (an ActiveRecord call) which implemented the same redirection logic i
>> had wired in earlier in mailauth.pm.
>>
>>
>> So now I have one instance of nginx on server A acting solely as a
>> mail proxy and another on server B serving as auth_http server.
>>
>> This time, stats from server B was like:
>>
>> Active connections: 1
>> server accepts handled requests
>>    1985 1985 1985
>> Reading: 0 Writing: 1 Waiting: 0
>>
>>
>> I don't follow why "writing" is always 1.
>> I've even setup multiple mail proxy nginx instances to use the same
>> server B's :81/auth as auth_http URI and yet I have writing = 1.
>>
>> I've seen other nginx+tomcat setups where stats are like:
>>
>> Active connections: 39
>> server accepts handled requests
>>  421439 421439 986972
>> Reading: 0 Writing: 28 Waiting: 11
>>
>> (writing > 1)
>>
>>
>> Can someone explain why this is the case?
>
> 1. Mail connections are only counted in active stats (and waiting,
> as it's calculated as "active - (reading + writing)").  Only
> connections which may contribute to "writing" is http connections.
>
> 2. Your request to stub_status will be in "writing" state when
> response is generated.  That's why "writing" is always at least 1.
>
> 3. With embedded perl (as well as stub_status) and small responses
> you have no chance to have two requests in "writing" state in the
> same worker, as requests are processed one-by-one.  As soon as
> nginx got full request it increments "writing", calls perl to
> generate response, write()'s result to socket, decremets
> "writing".  There are no points where nginx may switch to another
> request between incrementing and decrementing writing as it's not
> returns to event loops while processing request.
>
> With many workers there are chances to see several requests in
> "writing" state (up to 1 per worker) but this requires high
> concurency which is unlikely to happen in your case (as auth_http
> requests usually happen only once per mail connection).
>
> For http proxy/fastcgi/... setups (or just while serving big
> static responses, even without aio) situation is a bit different:
> nginx increments "writing", starts handling request and at some
> point it gets EAGAIN (e.g. waiting for connection to backend).
> Then it goes to event loop and starts processing other requests
> (if any).  This way you may see multiple request in "writing"
> state even in single worker.  Though this still requres at least
> one active request to be present in addtional to your status
> request which is unlikely to happen in your case (as auth_http...
> see above).
>
> Maxim Dounin
>
> _______________________________________________
> 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: What represents the unlimited value of client_max_body_size

Hello!

On Thu, Oct 28, 2010 at 02:10:38AM -0400, speedfirst wrote:

> What represents the unlimited value of client_max_body_size? Is it 0?
> The wiki of http core module say nothing about this.

There is no unlimited value. Set to something high enough instead.

Maxim Dounin

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

Re: reverse proxy and too many temp files

Hello!

On Wed, Oct 27, 2010 at 05:16:02PM -0400, roadfox wrote:

> hi
>
> we are using nginx as a reverse proxy in front of some webservers with
> media files.
> evrerithing works great beside when we start nginx new with an empty
> cache.
>
> in this situation allot of files in proxy_temp_path are create consuming
> quite fast all our diskspace, in the same time proxy_cache_path is only
> very slowly populated.
>
> i see two parameters who might help:
> proxy_cache_use_stale
> proxy_max_temp_file_size
>
> a quick test with *use_stale was not succesfull, but maybe something
> else was wrong

proxy_cache_use_stale only make sense if you already have data in
cache.

> and for proxy_max_temp_file_size=0 i'm not shure if it is the right
> thing todo

proxy_max_temp_file_size can't (and doesn't) limit writing to disk
responses expected to be saved to cache as nginx needs them on
disk to save to cache.

> what we would like to achieve is to uses as much of the diskspace for
> caching. but on a restart with clean cache, not filling up the temp
> folder which does not count to proxy_cache_path max_size.
>
> or should we just reduce the workers (16) to provent from having to many
> workers creating the same temp file for the same origin file?

No, reducing number of workers isn't likely to help as each worker
may handle many connections.

Solution to this problem is so called "busy locks" which are not
yet implemented.

Right now there is no good solution. Some possibilities include:
using limit_zone to limit number of requests (though this will
limit serving from cache as well), warming up cache before
startup, adding more disk space.

Maxim Dounin

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

2010年10月27日星期三

Re: reverse proxy and too many temp files

You mentioned gzip buffers, I was of the impression that gzip was all in memory?

On Thu, Oct 28, 2010 at 4:27 PM, roadfox <nginx-forum@nginx.us> wrote:
[quote]You probably need to increase the number and/or size of
proxy_buffers[/quote]

Our nginx reverse proxy is only serving media files with sizes between
100KB and 2MB.
As DiskI/O is a bottleneck we will try to increase proxy_buffers and see
what happens.

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


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



--
Warez Scene Free Rapidshare Downloads

What represents the unlimited value of client_max_body_size

What represents the unlimited value of client_max_body_size? Is it 0?
The wiki of http core module say nothing about this.

Thanks.

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


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

Re: reverse proxy and too many temp files

[quote]You probably need to increase the number and/or size of
proxy_buffers[/quote]

Our nginx reverse proxy is only serving media files with sizes between
100KB and 2MB.
As DiskI/O is a bottleneck we will try to increase proxy_buffers and see
what happens.

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


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

Re: reverse proxy and too many temp files

On Wed, Oct 27, 2010 at 4:16 PM, roadfox <nginx-forum@nginx.us> wrote:
> hi
>
> we are using nginx as a reverse proxy in front of some webservers with
> media files.
> evrerithing works great beside when we start nginx new with an empty
> cache.
>
> in this situation allot of files in proxy_temp_path are create consuming
> quite fast all our diskspace, in the same time proxy_cache_path is only
> very slowly populated.
>
> i see two parameters who might help:
> proxy_cache_use_stale
> proxy_max_temp_file_size
>
> a quick test with *use_stale was not succesfull, but maybe something
> else was wrong
> and for proxy_max_temp_file_size=0 i'm not shure if it is the right
> thing todo
>
> what we would like to achieve is to uses as much of the diskspace for
> caching. but on a restart with clean cache, not filling up the temp
> folder which does not count to proxy_cache_path max_size.
>
> or should we just reduce the workers (16) to provent from having to many
> workers creating the same temp file for the same origin file?

You probably need to increase the number and/or size of proxy_buffers
and perhaps your gzip_buffers. The defaults are way too small and
trade low memory usage for disk I/O (which is a really bad trade-off
most of the time). I have "proxy_buffers 16 32k;" and don't see temp
responses on disk at all with my applications (some of which send up
to 512KB uncompressed pages.
--
RPM

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

Re: proxy caching primer?

On Tue, Oct 26, 2010 at 2:34 PM, Ilan Berkner <iberkner@gmail.com> wrote:
> I'm trying to understand proxy caching, specifically for our php scripts.
>  How? what? when?
> Can anyone give me some basics?
> What about php scripts which serve dynamic data?
> Thanks

It's generally considered rude to post the same question twice in
quick succession.

I suggest you read http://wiki.nginx.org/NginxHttpProxyModule and the
mailing list archives (searched via google), then experiment in a test
environment. That's the only way you'll really understand what's going
on and be able to apply it to your own applications. As for your PHP
scripts, whether or not caching them is good or bad totally depends on
your application - they should only be cached if slighly old data
being served to users doesn't break things.

--
RPM

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

ngx_memc v0.11 released: small bug fixes and more documentation

Hi, folks!

I've just released the v0.11 version of our ngx_memc module:

   http://github.com/agentzh/memc-nginx-module/tarball/v0.11

This version applies the patch from iframist, fixing the zero size buf
alert in error.log when $memc_value is set to empty ("").

The ngx_memc module extends the standard memcached module to support
almost the whole memcached ascii protocol. And it can be used with
either the standard memcached server or other backends supporting the
memcached wire protocol like TokyoTyrant.

Maxim Dounin's excellent ngx_http_upstream_keepalive module can also
be used with this module to provide a powerful connection pool for
memcached.

See ngx_memc's wiki page for more details:

   http://wiki.nginx.org/HttpMemcModule

I've also updated the wiki page for this release and documented
various directives like memc_connect_timeout, memc_read_timeout,
memc_send_timeout, and memc_buffer_size. (These directives are
inherited directly from the standard memcached module.)

Enjoy!
-agentzh

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

Re: multiple limit_conn per connection

bryndole at 2010-10-28 9:49 wrote:
> I did some more research, ran a few experiments, and even looked at the
> code.
>
> What I described above is not possible. The limit_conn method fires
> exactly once for a connection, even if it goes to a "@retry" location.
> If you have several internal redirects ( rewrite /foo /bar last; ) only
> the last limit_conn is fired.
>
>
Maybe you can also use the limit_request. This module is similar with
the limit_conn module. Both the two module are limited to be used only
once in one request.
> Posted at Nginx Forum: http://forum.nginx.org/read.php?2,144501,145154#msg-145154
>
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://nginx.org/mailman/listinfo/nginx
>
>


--
Weibin Yao


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

Re: multiple limit_conn per connection

I did some more research, ran a few experiments, and even looked at the
code.

What I described above is not possible. The limit_conn method fires
exactly once for a connection, even if it goes to a "@retry" location.
If you have several internal redirects ( rewrite /foo /bar last; ) only
the last limit_conn is fired.

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


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

Strange cookie behavior using HttpUserIdModule

Hey all,

I'm seeing a strange behavior using the HttpUserIdModule. I am seeing significantly more set operations that I would expect. The ratio of about 50% sets to 50% gets remains constant regardless of the days covered. So, if I include 1 day then percentage is the same as if I include several days.

The usage pattern of the clients and the sheer volume of users would indicate that we would not see 50% day after day.

So, on to specifics:

Configuration

userid on;
userid_name uid;
userid_domain xyz.com;
userid_path /;
userid_expires 365d;
userid_p3p 'policyref="/w3c/p3p.xml", CP="CUR ADM OUR NOR STA NID"';

Requests flow in from

Client -> DNS load balance -> HA load balance -> 1 of 6 nginx servers

HA load balance is HAProxy.

There are 6 identically configured servers that accept requests. We are sending the cookie as a 3rd party cookie - i.e. the cookie comes because of a javascript on zxc.com which requests something from xyz.com (our site).

I am trying to figure out if this is a user agent not respecting the cookie or something else.

Has anyone seen strange results utilizing this setup?

Thanks!

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

reverse proxy and too many temp files

hi

we are using nginx as a reverse proxy in front of some webservers with
media files.
evrerithing works great beside when we start nginx new with an empty
cache.

in this situation allot of files in proxy_temp_path are create consuming
quite fast all our diskspace, in the same time proxy_cache_path is only
very slowly populated.

i see two parameters who might help:
proxy_cache_use_stale
proxy_max_temp_file_size

a quick test with *use_stale was not succesfull, but maybe something
else was wrong
and for proxy_max_temp_file_size=0 i'm not shure if it is the right
thing todo

what we would like to achieve is to uses as much of the diskspace for
caching. but on a restart with clean cache, not filling up the temp
folder which does not count to proxy_cache_path max_size.

or should we just reduce the workers (16) to provent from having to many
workers creating the same temp file for the same origin file?

cheers
andi

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


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

HTTP 411 Length Required Errors

Greetings, we'd like to use nginx to balance for multiple instances of
core grid services for the Atlanta Clinical & Translational Science
Biomedical Informatics Grid. We've used nginx successfully on several
other projects, but this time we're seeing the errors below when
accessing from grid clients. Note that these registration requests
succeed when pointed directly to the JBoss container hosting the
back-end grid services but not when pointed to nginx. These clients are
based on caGrid (cancer research grid) and Globus grid foundation. This
is the first time we've used nginx in conjunction with these types of
clients, so we suspect it has something to do with these clients, but we
noticed this previous nginx thread and wondered if others have had and
solved this problem recently either with nginx configuration or by
modifying client behavior. Any help or suggestions would be greatly
appreciated...thanks!

--Steve

2010/10/27 12:54:40 [notice] 12501#0: nginx/0.8.53
2010/10/27 12:54:40 [notice] 12501#0: built by gcc 4.4.4 20100630 (Red
Hat 4.4.4-10) (GCC)
2010/10/27 12:54:40 [notice] 12501#0: OS: Linux 2.6.32.16-linode28

----------------------------------------------------------------------------------------------------
caGrid Dorian Service Error contacting the IndexService balanced by
nginx:
----------------------------------------------------------------------------------------------------
13:31:02,796 WARN [ServiceGroupRegistrationClient] Warning: Could not
register https://grid.poc.actsi.org:9443/wsrf/services/cagrid/Dorian to
servicegroup at
http://index.poc.actsi.org/wsrf/services/DefaultIndexService -- check
the URL and that the remote service is up. Remote exception was
(411)Length Required
13:31:02,796 ERROR [AdvertisementClient] Got exception from status
callback:(411)Length Required
AxisFault
faultCode: {http://xml.apache.org/axis/}HTTP
faultSubcode:
faultString: (411)Length Required
faultActor:
faultNode:
faultDetail:
{}:return code: 411

-----------------------
nginx access.log:
-----------------------
74.207.227.154 - - [27/Oct/2010:13:31:02 -0400] "POST
/wsrf/services/DefaultIndexService HTTP/1.1" 411 181 "-" "Axis/1.2RC2"

-----------------------
nginx error.log:
-----------------------

2010/10/27 13:31:02 [info] 12549#0: *3 client sent "Transfer-Encoding:
chunked" header while reading client request headers, client:
74.207.227.154, server: grid.poc.actsi.org, request: "POST
/wsrf/services/DefaultIndexService HTTP/1.1", host:
"index.poc.actsi.org"

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


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

Re: Image Hosting

remount the filesystem with option noatime and nodiratime may help

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


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