ahoy,
i'm running wordpress 3x on nginx and all my ajax calls are broken. the exactly same wordpress runs fine on Apache.
i've fixed somehow an ajax call to work with nginx by removing 'index.php' from all jquery.post() calls, but i couldn't fix the other calls in the same way.
basically the changes were: for nginx the line:
jQuery.post( 'index.php?ajax=true', form_values, function(returned_data) {
was replaced with:
jQuery.post( '?ajax=true', form_values, function(returned_data) {
i suspect the problem lies in the nginx config file with rewrite rules. There you are with my configuration
if (!-e $request_filename) {
rewrite ^.+/?(/wp-.*) $1 last;
rewrite ^.+/?(/.*\.php)$ $1 last;
rewrite ^(.+)$ /index.php?q=$1 last;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /xxx/public$fastcgi_script_name;
include fastcgi_params;
}
}