This is a quick and lazy way of doing this that doesn’t touch nginx configs, but works reliably.
When I visit my server’s domain, by default it would show me the “welcome to nginx” page. A bit lame honestly.
To change that, All I did was:
-
rename the
/var/www/index.nginx-debian.html
toindex.nginx-debian.html.old
-
replaced it with a new index.nginx-debian.html which contained a single line of HTML:
<meta http-equiv="Refresh" content="0; url='destination/url/here'" />
and saved it.
You can confirm this works by heading to your server’s domain root and confirming it instantly redirects you.
Could you do this in nginx configs? sure. But this is much easier and intuitive imo.