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.
- Ensure you can reboot the host in question with its current configurations.
- Perform 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.
- Using 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.
- The following is an example of the steps to perform to change the Apache server's IP address:
- Backup the httpd conf directory (to ensure rollback ability, if needed).
- Update the httpd conf files to use the new IP address of the server.
- Update or add the new IP to the server/host.
- 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.
- Restart the Apache host services and verify successful restart by validating the web server’s ability to serve web-pages/applications.
- Reboot the server host and verify that the environment launches successfully.
- Confirm all other monitoring and backup processes are functional with the new IP address of the server/host.
- 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.