Welcome! Log In Create A New Profile

Advanced

Re: WordPress MU rewrite rules

Daniele Melosi
October 20, 2009 10:10AM
I've similar error with wordpress mu configured on nginx + fastcgi

if I enabled permalink in this format: /%year%/%monthnum%/%day%/%postname%/
(es. http://test.mydomain.tld/2009/10/20/test02/) i received every time
the same page, if i configured permalinks in the default format every
think works fine (for example: http://test.mydomain.tld/?p=123))

This is my configuration:
server {
listen 80;
server_name test.mydomain.tld;

access_log /var/log/nginx/test.mydomain.tld.log;
error_log /var/log/nginx/test.mydomain.tld.error.log;
error_log /var/log/nginx/test.mydomain.tld.error.log notice;
rewrite_log on;

location / {
root /var/www/test.mydomain.tld;
index index.php index.html index.htm;

if (-f $request_filename) {
expires 30d;
break;
}

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

if (!-e $request_filename) {
rewrite ^ /index.php last;
}
}

location ~ \.php$ {
include /etc/nginx/fastcgi_params;
fastcgi_pass fcgi5;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME
/var/www/test.mydomain.tld$fastcgi_script_name;
fastcgi_param DOCUMENT_ROOT
/var/www/test.mydomain.tld/;
}
}

This is the rewrite logs:
2009/10/20 11:57:45 [notice] 3183#0: *17 "^.*/files/(.*)" does not match
"/2009/10/20/test01/", client: 192.168.251.27, server:
drupal.lantians.net, request: "GET /2009/10/20/test01/ HTTP/1.1", host:
"drupal.lantians.net", referrer: "http://drupal.lantians.net/"
2009/10/20 11:57:45 [notice] 3183#0: *17 "^" matches
"/2009/10/20/test01/", client: 192.168.251.27, server:
drupal.lantians.net, request: "GET /2009/10/20/test01/ HTTP/1.1", host:
"drupal.lantians.net", referrer: "http://drupal.lantians.net/"
2009/10/20 11:57:45 [notice] 3183#0: *17 rewritten data: "/index.php",
args: "", client: 192.168.251.27, server: drupal.lantians.net, request:
"GET /2009/10/20/test01/ HTTP/1.1", host: "drupal.lantians.net",
referrer: "http://drupal.lantians.net/"

Any ideas ?
Daniele

Edho P Arief ha scritto:
> On Fri, Oct 9, 2009 at 2:14 PM, pepejose <nginx-forum@nginx.us> wrote:
>> sorry but I do not understand your solution.
>>
>>
>> many thanks to the two
>>
>> Posted at Nginx Forum: http://forum.nginx.org/read.php?2,8334,12295#msg-12295
>>
>>
>>
>
> here's the config I tried and seems to be working:
> http://pastebin.com/m40212ee1
>
> replace
>
> include php_params;
>
> with
>
> proxy_set_header Host $host;
> proxy_set_header X-Real-IP $remote_addr;
> proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
> proxy_pass http://127.0.0.1:8080;
>
> like this http://pastebin.com/m1ea4181e
>
> but I'm not sure if it works with apache backend...
>
Subject Author Posted

WordPress MU rewrite rules

pepejose September 22, 2009 04:52AM

Re: WordPress MU rewrite rules

pepejose October 08, 2009 10:46AM

Re: WordPress MU rewrite rules

Grzegorz Sienko October 08, 2009 03:42PM

Re: WordPress MU rewrite rules

edogawaconan October 08, 2009 11:04PM

Re: WordPress MU rewrite rules

pepejose October 09, 2009 03:14AM

Re: WordPress MU rewrite rules

edogawaconan October 09, 2009 02:36PM

Re: WordPress MU rewrite rules

Daniele Melosi October 20, 2009 10:10AM

Re: WordPress MU rewrite rules

edogawaconan October 20, 2009 10:54AM

Re: WordPress MU rewrite rules

Daniele Melosi October 21, 2009 04:00AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 193
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready