Magento Error 404 after moving from Apache to nginX

Solution 1:

Here is your problem:

  location @handler { rewrite / /index.php; }

After the rewrite, you go back to location / and back through try_files again. Then it goes back to @handler and you're in an endless loop.

This appears to be totally redundant; just get rid of it and add it directly to try_files.

  try_files $uri $uri/ /index.php;

Solution 2:

It's not an nginx problem.

When accessing the backend, a block notification of security is called.

Look at the class Mage_Adminhtml_Block_Notification_Security:

the "_canShowNotification" function calls another function "_isFileAccessible" which executes a POST to get the file "local.xml".