[Fixed]-How to retain the domain name while redirecting to my IP

1👍

All you need to do is to add your domain into server_name entry in your nginx config. All names should be separated by whitespaces, so if you want to preserve your site on that IP address, but add also ability to use it on domain, your server_name line should be:

   server_name  54.186.220.140 mygrounds.in;

If you want to serve your app only on domain, it should be:

   server_name  mygrounds.in;

Leave a comment