I'm trying to install nginx on CentOS 6.5, then I added these lines on file /etc/yum.repos.d/nginx.repo

Then install nginx by: 
And I've got a message error: No package nginx available How can I fix it? I would greatly appreciate any help you can give me in working this problem!
Your repo url is having an error. It is necessary to manually replace $releasever with either "5" (for 5.x) or "6" (for 6.x), depending upon your OS version. Similarly you have to edit the $basearch also. After that do the following command
yum clean all
yum install nginx
An alternative option is to install the epel repository and install nginx from there.
yum install epel-release
yum clean all
yum install nginx