3 messages in ru.sysoev.nginxrewrite rules debugging: how?
FromSent OnAttachments
Igor SysoevFeb 22, 2007 7:47 am 
Boris BarzitzFeb 22, 2007 9:34 am 
Igor SysoevFeb 22, 2007 9:39 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:rewrite rules debugging: how?Actions...
From:Boris Barzitz (bart@public.gmane.org)
Date:Feb 22, 2007 9:34:05 am
List:ru.sysoev.nginx

hello,

i'm migrating a site from apache and having problems with rewrite rules (i
guess). how do i debug them? i've heard that nginx should write some debug info to the error log, but i
can't make it to. which options should i use to switch on the debugging?

error_log /var/log/file.log debug; doesn't output any debug info.

here's my vhost config:

server { listen 80; server_name contactbles.com www.contactbles.com; index index.html index.php;

access_log /var/log/nginx/contactbles-access.log; error_log /var/log/nginx/contactbles-error.log debug;

client_max_body_size 2M;

root /home/contactbles/public_html;

if (!-f $request_filename) { rewrite ^/$ php/index.php last; rewrite ^/fonts/(\d)\.html$ /php/fontlist.php?page=$1 last; rewrite ^/backgrounds/(\d+)\.html$ /php/bglist.php?page=$1 last; rewrite ^/backgrounds/([0-9]+)/(\d+)\.html$
/php/bglist.php?category=$1&page=$2 last; rewrite ^/tables/(\d+)\.html$ /php/tables.php?page=$1 last; rewrite ^/tables/([0-9]+)/(\d+)\.html$
/php/tables.php?category=$1&page=$2 last; rewrite ^/(.+)\.html$ php/$1.php last; }

include /etc/nginx/fcgi.conf; }

thanks,

Boris