Nginx – Sudden error with wordpress with nginx only (Uncaught SyntaxError: Unexpected end of input)

nginxphp-fpmUbuntuWordpress

I've installed WordPress on my VPS and is run smoothly with apache2. But recently , I recognized that it consume too much RAM (~600MB for 7-8 session) so I decided to change to Nginx. After changing for few days, it's working fine, without any problem but suddenly yesterday, the Admin Page layout was destroyed. I looked into the console log and found out this problem: Uncaught SyntaxError: Unexpected end of input, the file was wp-admin/load-scripts.php.

You can access to the file as

http://vietnammechkey.com/wp-admin/load-scripts.php?c=0&load%5B%5D=jquery-core,jquery-migrate,utils,json2&ver=3.8.2 [Nginx]

http://vietnammechkey.com:8888/wp-admin/load-scripts.php?c=0&load%5B%5D=jquery-core,jquery-migrate,utils,json2&ver=3.8.2 [Apache2]

The file will be longer if I use Apache2 and it will be sorter if I use nginx

Note: The WordPress working perfectly on Apache2.

Best Answer

Problem solved, nginx can't acces to it's buffer folder "/var/lib/nginx". Just chmod 0755 and it's working fine now