W3TC: PageCache error with rewriting rules with nginx ( 503 error w3tc_rewrite_test)

I have the below problem when I changed PageCache with APC to Disk Enhance:

W3 Total Cache error: It appears Page Cache URL rewriting is not working. Please verify that all configuration files are included in the configuration file (and that you have reloaded / restarted nginx). Unfortunately disk enhanced page caching will not function without custom rewrite rules. Please ask your server administrator for assistance. Also refer to the install page for the rules for your server. Technical info

nginx configuration file contains rules to rewrite url http://mydomain.com/w3tc_rewrite_test into http://mydomain.com/?w3tc_rewrite_test which, if handled by plugin, return “OK” message. The plugin made a request to http://mydomain.com/w3tc_rewrite_test but received: 503 Service Unavailable instead of “OK” response.

Any idea? I never had seen this error and I have total cache some month ago and I had changed some times Page Cache mode.

@Tam, Can you give you Nginx configuration information by using following command:

cat /etc/nginx/sites-available/example.com

Also please take a look at our following post: