I found a lot of tutorial on the internet on how to redirect an old domain to a new domain like from this tutorial. But since this should be done under "server" directives, whenever you restart nginx, the settings will be removed. I believe we cannot add this to "nginx Directives" under Web Domain > Option using the UI of ispconfig. So, where can I put the following settings so that even if we restart nginx, the settings will not be removed by ispconfig?
No need for any manual config. Just add the old domain as aliasdmain to the website in ispconfig and use the redirect function in ispconfig.