Issue: After restarting the server, the Apache service failed to start.
Cause: The configuration file /etc/apache2/sites-enabled/vitalpbx.conf contained duplicate Listen directives for the same ports, resulting in the error “Cannot define multiple Listeners on the same IP:port”.
Context: Prior to the restart, an update was performed on the server without a subsequent restart. When the server was finally restarted, the port conflict issue became apparent. Additionally, this server operates with a custom HTTPS port.
Resolution: The duplicate Listen directives were removed from the specific configuration file, and port management was centralized in the main Apache configuration file. This resolved the port conflict and allowed the Apache service to start correctly.
Steps Taken:
- Identified the issue by checking the Apache error logs.
- Used
grepto find allListendirectives across Apache configuration files. - Edited the
/etc/apache2/sites-enabled/vitalpbx.conffile to remove the duplicateListendirectives. - Ensured the custom HTTPS port configuration was correctly set.
- Restarted the Apache service to ensure it started without errors.
Recommendation: It is recommended to fix the issue in the update process that leads to duplicate Listen directives being created. By addressing this problem at the source, future updates can avoid causing service disruptions and ensure smoother operation post-restart.