Welcome! Log In Create A New Profile

Advanced

Re: troubleshoot rewrite log

Maxim Dounin
December 10, 2009 08:02AM
Hello!

On Thu, Dec 10, 2009 at 05:37:04PM +0500, Ziyad Saeed wrote:

> Where do you use that directive. Under the HTTP block its giving me no
> errors

It's allowed in http, server, if in server, location, if in location
contexts.

With the following config

error_log /path/to/error_log notice;
rewrite_log on;

server {
listen 8080;
server_name zzz;
rewrite ^ /blah break;
}

you should see something like this in error_log:

2009/12/10 15:50:19 [notice] 12343#0: *1 "^" matches "/", client: 127.0.0.1, server: zzz, request: "GET / HTTP/1.0"
2009/12/10 15:50:19 [notice] 12343#0: *1 rewritten data: "/blah", args: "", client: 127.0.0.1, server: zzz, request: "GET / HTTP/1.0"

If you don't see such messages - either you have no rewrites
defined in matching server{} block, or your set logging level
higher than notice.

Maxim Dounin

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

>
> On Thu, Dec 10, 2009 at 3:41 AM, Maxim Dounin <mdounin@mdounin.ru> wrote:
>
> > Hello!
> >
> > On Wed, Dec 09, 2009 at 09:22:32PM +0500, Ziyad Saeed wrote:
> >
> > > is there a rewrite log file that shows what is the rewrite engine doing,
> > > what is it trying to match and failing etc
> >
> > rewrite_log on;
> >
> > With this settings basic rewrite information will be logged to
> > error_log at notice level.
> >
> > 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


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

troubleshoot rewrite log

MySchizoBuddy December 09, 2009 11:26AM

Re: troubleshoot rewrite log

Maxim Dounin December 09, 2009 05:46PM

Re: troubleshoot rewrite log

MySchizoBuddy December 10, 2009 07:42AM

Re: troubleshoot rewrite log

Maxim Dounin December 10, 2009 08:02AM

Re: troubleshoot rewrite log

MySchizoBuddy December 10, 2009 03:20PM

Re: troubleshoot rewrite log

Igor Sysoev December 10, 2009 03:32PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 154
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready