I've seperated your question from the thread "Nginx + Moodle configuration tips" http://moodle.org/mod/forum/discuss.php?d=157382 They are simply not the same! Your question may not even be performance related.
Any way, get the second problem, pics not displayed solved first. Your referer URL http://22.214.171.124/moodle/user/files.php looks suspicious to me. Check your $CFG->webroot setting. All these are explained in the docs, http://docs.moodle.org/20/en/Installing_Moodle for example.