is there a rewrite log file that shows what is the rewrite engine doing,
what is it trying to match and failing etc
Hello!
On Wed, Dec 09, 2009 at 09:22:32PM +0500, Ziyad S. 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 D.
Where do you use that directive. Under the HTTP block its giving me no
errors
Hello!
On Thu, Dec 10, 2009 at 05:37:04PM +0500, Ziyad S. 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 D.
p.s. Please do not top-post. Thank your.
rewrite_log on;
On Fri, Dec 11, 2009 at 01:16:20AM +0500, Ziyad S. wrote:
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?
No. You may only look in debug log:
http://nginx.org/en/docs/debugging_log.html
–
Igor S.
http://sysoev.ru/en/
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?