20 messages in ru.sysoev.nginxRe: wordpress rewrite nginx
FromSent OnAttachments
Anonymous CowardFeb 12, 2007 3:48 pm 
Scott YangFeb 12, 2007 3:52 pm 
Anonymous CowardFeb 13, 2007 4:48 am 
Igor SysoevFeb 13, 2007 4:59 am 
Anonymous CowardFeb 13, 2007 5:46 am 
Igor SysoevFeb 13, 2007 6:14 am 
Anonymous CowardFeb 13, 2007 6:20 am 
Per JonssonFeb 13, 2007 6:33 am 
Anonymous CowardFeb 13, 2007 7:13 am 
Igor SysoevFeb 13, 2007 7:29 am 
Anonymous CowardFeb 13, 2007 7:42 am 
Igor SysoevFeb 13, 2007 11:31 am 
Jonathan VanascoFeb 13, 2007 12:13 pm 
Anonymous CowardFeb 14, 2007 2:08 am 
Igor SysoevFeb 14, 2007 5:21 am 
Igor SysoevFeb 14, 2007 5:27 am 
Anonymous CowardFeb 14, 2007 5:56 am 
Kirill T.Nov 10, 2007 6:21 pm 
HoneNov 11, 2007 7:54 pm 
Kirill T.Nov 14, 2007 3:21 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:Re: wordpress rewrite nginxActions...
From:Per Jonsson (poj+@public.gmane.org)
Date:Feb 13, 2007 6:33:24 am
List:ru.sysoev.nginx

Shouldn't that be changed around like this:

server { listen my.ip.here; server_name sub.domain.tld;

access_log /var/log/nginx/subdomain.access_log main; error_log /var/log/nginx/subdomain.error_log;

rewrite ^(.*)?/?files/(.*) /wp-content/blogs.php?file=$2;

location / { root /var/www/localhost/htdocs/sub.domain.tld; allow 192.168.2.0/24; deny all;

if (!-e $request_filename) { rewrite ^([_0-9a-zA-Z-]+)?(/wp-.*) $2 last; rewrite ^([_0-9a-zA-Z-]+)?(/.*\.php)$ $2 last; rewrite ^ /index.php last; } } location ~ .php$ { include /etc/nginx/fastcgi_params; fastcgi_pass 127.0.0.1:1105; fastcgi_index index.php;

# where the php files to pass to the listener. fastcgi_param SCRIPT_FILENAME /var/www/localhost/htdocs/subdomain.tld$fastcgi_script_name; } } }

At least it feels more sane to check for existance when you have a root fixed. I can be wrong, as nginx's nonlinear config can be somewhat confusing, but that is the way we're doing it in our setup.

Best Wishes,