Change IP

In case you have to change an existing IP in DirectAdmin, you can do this with (old IP 1.2.3.4/New IP 4.3.2.1):

 

cd /usr/local/directadmin/scripts
./ipswap.sh 1.2.3.4 4.3.2.1

 

If you run NGINX (as reverse proxy) you need to edit etc/nginx/nginx-vhosts.conf. manually. Replace there (twice, listen :80 and :443) the old IP with the new IP and when you are done, run:

cd /usr/local/directadmin/custombuild
./build rewrite_confs

Source

This article was written by: Alentejo Hosting.

Was this article helpful to you?

Leave a Reply