oh so i have to use rewrite command and not try_files command. no wonder i wasn't getting anything<div>is there a log for try_files?<br><br><div class="gmail_quote">On Thu, Dec 10, 2009 at 5:57 PM, Maxim Dounin <span dir="ltr"><<a href="mailto:mdounin@mdounin.ru">mdounin@mdounin.ru</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hello!<br>
<div class="im"><br>
On Thu, Dec 10, 2009 at 05:37:04PM +0500, Ziyad Saeed wrote:<br>
<br>
> Where do you use that directive. Under the HTTP block its giving me no<br>
> errors<br>
<br>
</div>It's allowed in http, server, if in server, location, if in location<br>
contexts.<br>
<br>
With the following config<br>
<br>
error_log /path/to/error_log notice;<br>
rewrite_log on;<br>
<br>
server {<br>
listen 8080;<br>
server_name zzz;<br>
rewrite ^ /blah break;<br>
}<br>
<br>
you should see something like this in error_log:<br>
<br>
2009/12/10 15:50:19 [notice] 12343#0: *1 "^" matches "/", client: 127.0.0.1, server: zzz, request: "GET / HTTP/1.0"<br>
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"<br>
<br>
If you don't see such messages - either you have no rewrites<br>
defined in matching server{} block, or your set logging level<br>
higher than notice.<br>
<font color="#888888"><br>
Maxim Dounin<br>
</font><br>
p.s. Please do not top-post. Thank your.<br>
<div><div></div><div class="h5"><br>
><br>
> On Thu, Dec 10, 2009 at 3:41 AM, Maxim Dounin <<a href="mailto:mdounin@mdounin.ru">mdounin@mdounin.ru</a>> wrote:<br>
><br>
> > Hello!<br>
> ><br>
> > On Wed, Dec 09, 2009 at 09:22:32PM +0500, Ziyad Saeed wrote:<br>
> ><br>
> > > is there a rewrite log file that shows what is the rewrite engine doing,<br>
> > > what is it trying to match and failing etc<br>
> ><br>
> > rewrite_log on;<br>
> ><br>
> > With this settings basic rewrite information will be logged to<br>
> > error_log at notice level.<br>
> ><br>
> > Maxim Dounin<br>
> ><br>
> > _______________________________________________<br>
> > nginx mailing list<br>
> > <a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
> > <a href="http://nginx.org/mailman/listinfo/nginx" target="_blank">http://nginx.org/mailman/listinfo/nginx</a><br>
> ><br>
<br>
> _______________________________________________<br>
> nginx mailing list<br>
> <a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
> <a href="http://nginx.org/mailman/listinfo/nginx" target="_blank">http://nginx.org/mailman/listinfo/nginx</a><br>
<br>
<br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://nginx.org/mailman/listinfo/nginx" target="_blank">http://nginx.org/mailman/listinfo/nginx</a><br>
</div></div></blockquote></div><br></div>