It is necessary to manually replace $releasever with either "5" (for 5.x...

...) or "6" (for 6.x)

http://wiki.nginx.org/Install

'Due to differences between how CentOS, RHEL, and Scientific Linux populate the $releasever variable, it is necessary to manually replace $releasever with either "5" (for 5.x) or "6" (for 6.x), depending upon your OS version.'