Hello, I need help for Redirect Old IP to New IP in UBUNTU NGINX ? can you please help explain how to do it step by step Thanks…
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Hi @LittleTurquoiseShip,
For redirect old IP to a new hostname:
If you want to redirect to another ip:
Hope helps you, Sergio Turpín
Hi @LittleTurquoiseShip,
You can add the redirect in your website’s Nginx config, in your main server block for port 80 and 443, you can add the something like the following:
This redirect needs to be somewhere around your server_name(right under it for an example).
The file you can edit is
/etc/nginx/sites-enabled/Domain-Name.conf
where Domain-name.conf is your actual conf file. It can be named a lot of things.