If you are on windows then below port related server settings are present in file nginx.conf at < nginx installation path >/conf folder.
server {
listen 80;
server_name localhost;
....
Change the port number and restart the instance.