Converting IP address to domain names using nginx in linux

I am trying to convert a test IP to a domain name using nginx on Linux I have created the file in /etc/nginx/sites-available and i have done using (ls -n..) the symbolic link and the file created has the following written on it

Server {

listen :80;

Server_name  example.com;

rewrite ^/(.*) http://example.com/$1 permanent;

}

Server {

listen 80;

server_name www.example.com;

}

My concern is when I reload my IP I keep getting the default page for nginx instead of the supposed changes

Can someone please explain why this is going on and thank you so much in advance

Read more here: Source link