troubleshoot rewrite log
Ziyad Saeed
myschizobuddy at gmail.com
Thu Dec 10 23:16:20 MSK 2009
oh so i have to use rewrite command and not try_files command. no wonder i
wasn't getting anything
is there a log for try_files?
On Thu, Dec 10, 2009 at 5:57 PM, Maxim Dounin <mdounin at mdounin.ru> wrote:
> 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 at 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 at nginx.org
> > > http://nginx.org/mailman/listinfo/nginx
> > >
>
> > _______________________________________________
> > nginx mailing list
> > nginx at nginx.org
> > http://nginx.org/mailman/listinfo/nginx
>
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://nginx.org/mailman/listinfo/nginx
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20091211/3c98d533/attachment.html>
More information about the nginx
mailing list