CentOS 7 - scenarios to Start Apache on Boot with 'Address already in use' scenarios When Using Virtual Hosts
Does anyone know how to I'm building a feature where I'm having trouble getting Apache to start automatically on boot on my CentOS 7 server... I have configured multiple virtual hosts, but whenever the system boots up, I receive the behavior `Failed to start httpd.service: Address already in use` in the logs. I checked the configuration with `apachectl configtest`, and it returns `Syntax OK`, which makes me think the scenario might not be in the configuration files. I've also tried running `systemctl start httpd` manually after boot, and it works fine, but I need it to start automatically. In my `/etc/httpd/conf/httpd.conf`, I have the following virtual hosts set up: ```apache <VirtualHost *:80> ServerName example1.com DocumentRoot /var/www/example1 </VirtualHost> <VirtualHost *:80> ServerName example2.com DocumentRoot /var/www/example2 </VirtualHost> ``` I confirmed that the ports are not being used by other services by running `netstat -tuln | grep :80`, and there isn't anything else bound to port 80. I also checked the logs in `/var/log/httpd/error_log`, but I couldn't find any additional information that might suggest why Apache need to bind to the address on startup. I've also tried disabling SELinux temporarily with `setenforce 0`, but that didn't resolve the scenario. What steps can I take to troubleshoot this further and ensure Apache starts correctly on boot? I'm working on a CLI tool that needs to handle this. The stack includes Bash and several other technologies. How would you solve this? I'm coming from a different tech stack and learning Bash.