Just to be sure the nginx config is located in /etc/nginx/conf.d/ and /etc/nginx/nginx.conf remained untouched? Usualy the upstream and server block belong in a http block. The defaul nginx.conf includes all files in conf.d in a http block, which should make your configuration work.