2011年3月20日星期日

Re: 504 error Gateway Timeout.

Fine. But please note, this is only part of configuration. There are
some files regarding to directive:
/etc/nginx/vhosts/*

Please include them also.

--
Regards, Vitaly Tskhovrebov
System Administrator
U.S. +1 (206) 905-9939
Russia +7 911 094-2035

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

Re: 504 error Gateway Timeout.

maybe is apache or php close the connection, for example exceed php max
file upload size or php max running time.

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


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

Re: 504 error Gateway Timeout.

> http {

proxy_read_timeout 600;
proxy_send_timeout 600;

>  server_name_in_redirect off;
>  server_names_hash_max_size 2048;
>  server_names_hash_bucket_size 256;


I added the above proxy read and proxy send lines. I had just
reinstalled this morning after doing some testing and accidentally
sent you the file without those added.

Thanks,

Jamie

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

2011年3月19日星期六

Re: Status 401 Behaviour Issue

> Hi there,
>
> > I noticed a certain behaviour of the 401 status
> code response I will like to change.
>
> > With Nginx however, if I define an html page
> error_page for 401, this gets served every time a
> user requests the protected directory and there is
> no opportunity to fill in the authentication
> details.
>
> That sounds odd to me.
>
> What *should* happen is the web server returns
> http 401 with some body
> content; the web browser chooses whether to
> display that body content,
> or to request authentication credentials, as it
> sees fit.
>
> What is your error_page config?
>
> Quick testing here shows that
>
> error_page 401 /401.html;
>
> returns the right content with the right status,
> as I would expect.
>
> error_page 401 = /401.html;
>
> returns the right content, but with a http 200
> status, which sounds like
> it matches what you are seeing.
>
> As per
> http://wiki.nginx.org/HttpCoreModule#error_page,
> adding the
> "=" means "handle this (sub)request, and change
> the return status to
> whatever it generates instead of what we started
> with". For 401, you
> probably don't want that.
>
> > Is it possible to set it up such that it behaves
> like Apache does? I.E. only return the html
> error_page if the authentication fails? This seems
> like a better implementation to me.
>
> Leave out the "="?
>
> > Running 0.8.54
>
> I tested with 0.9.4, but I don't see any obvious
> code fixes that would
> have changed this.

Hi. Thanks for that.

Yep, the second config was what was causing it for me. It didn't
"matter" with the other codes as there is no further processing to be
done and users saw the right pages for the circumstances. Does also
explain why my caching config for error pages did no quite work
properly.

In summary, after rereading the docs properly

1. "error_page code url" means return "code" and show "url"
2. "error_page code =anycode url" means return "anycode" and show "url"
3. "error_page code = url" means redirect to this url whenever "code" is
encountered. A "200 OK" response is returned if "url" is found.

Thanks again for helping me get to understand this better

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


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

Re: Status 401 Behaviour Issue

On Sat, Mar 19, 2011 at 03:03:11PM -0400, Dayo wrote:

Hi there,

> I noticed a certain behaviour of the 401 status code response I will like to change.

> With Nginx however, if I define an html page error_page for 401, this gets served every time a user requests the protected directory and there is no opportunity to fill in the authentication details.

That sounds odd to me.

What *should* happen is the web server returns http 401 with some body
content; the web browser chooses whether to display that body content,
or to request authentication credentials, as it sees fit.

What is your error_page config?

Quick testing here shows that

error_page 401 /401.html;

returns the right content with the right status, as I would expect.

error_page 401 = /401.html;

returns the right content, but with a http 200 status, which sounds like
it matches what you are seeing.

As per http://wiki.nginx.org/HttpCoreModule#error_page, adding the
"=" means "handle this (sub)request, and change the return status to
whatever it generates instead of what we started with". For 401, you
probably don't want that.

> Is it possible to set it up such that it behaves like Apache does? I.E. only return the html error_page if the authentication fails? This seems like a better implementation to me.

Leave out the "="?

> Running 0.8.54

I tested with 0.9.4, but I don't see any obvious code fixes that would
have changed this.

All the best,

f
--
Francis Daly francis@daoine.org

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

Re: 100% CPU Usage (on all 8 cores)

Nevermind... I have sorted this issue out and will post the resolution
when I confirm its not crashing my server anymore.

Thank you very much for replying :)

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


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

nginx reverse proxy must understand lighttpd rewrite rules

Hi,

Server 1: got lighttpd with rewrite rules (lighttpd rewrite rules)
Server 2: got reverse proxy (no rewrite rules)

When on server 2 as proxy serving lighttpd i dont have any rules in its
config and it still understand what server 1 sending and serving as it
would have rewrite rules.

Problem arise when i switch on Server 2 lighttpd to nginx. Nginx serving
pages but doing 404 for rewrite pages received from Server 1.
Do i must convert rewrite rules from lighttpd on Server 1 and place it
in Server 2 nginx configuration to make nginx understand rewrites?

Or problem is somewhere else.

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


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