Below are the recommended steps to change the IP address of an existing host for Apache services or any other web, application or database server.
1Ensure you can reboot the host in question with its current configurations.
2Perform an audit of the firewall, network switches and routers (including NAT/Bidirectional NAT/Port Mappings rules, etc.) related to the host in question – this is to gain understanding of you environment’s dependencies.
3Using the information from step #2 above, implement the new firewall/network rules for the new IP you plan to assign to the host. The added advantage of this step is to give you the opportunity to clean up legacy rules or routes that are no longer needed for the host.
4The following is an example of the steps to perform to change the Apache server's IP address:
a. Backup the httpd conf directory (to ensure rollback ability, if needed).
b. Update the httpd conf files to use the new IP address of the server.
c. Update or add the new IP to the server/host.
d. Ensure DNS records exist, if not, create them to facilitate name resolution for the new IP of the host’s FQDN – Fully Qualified Domain Name.
e. Restart the Apache host services and verify successful restart by validating the web server’s ability to serve web-pages/applications.
f. Reboot the server host and verify that the environment launches successfully.
g. Confirm all other monitoring and backup processes are functional with the new IP address of the server/host.
h. Cleanup the old/legacy IP as needed to ensure no legacy configurations are left behind.
In summary: Understand the current state. First prep the network resources such as switches, routers and firewall configurations. Follow with name services, such as DNS (domain name service) and authentication/authorization (such as LDAP, AD etc.) for the future state. Finish with everything else (host/application config etc.). This order should ensure successful implementation.