ahoy,

i am running wordpress 3x on nginx and all sorts of my ajax calls are damaged. the exactly same wordpress runs fine on Apache.

i have fixed in some way an ajax call to utilize nginx by getting rid of 'index.php' all jquery.publish() calls, however i could not fix another calls in the same manner.

essentially the alterations were: for nginx the road:

jQuery.post( 'index.php?ajax=true', form_values, function(returned_data) {

was changed with:

jQuery.post( '?ajax=true', form_values, function(returned_data) {

i suspect the issue is based on the nginx config file with rewrite rules. Bam ! 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;
}
}

Can it be that you're in a directory or "virtual" directory within the browser URL?

If, for instance, you're at www.myblog.com this will work, but on www.myblog.com/my-category/my-publish/ it most likely wouldn't.

Excuses have you employed your testing in the identical URL-location around the Apache site and also the Nginx site?

Perhaps you have attempted having a slash while watching road to ensure that it's the root script being known as?

jQuery.post( '/index.php?ajax=true', form_values, function(returned_data) {