I am running an EC2 Linux 2 AMI and was following an AWS tutorial to enable HTTPS on my server.
But when I try to restart Apache, error seen in the logs:
Apr 10 06:56:40 <maskediphere> systemd[1]: Starting The Apache HTTP Server... Apr 10 06:56:40 <maskediphere> httpd[30696]: (98)Address already in use: AH00072: make_sock: could not bind t...:]:80 Apr 10 06:56:40 <maskediphere> httpd[30696]: (98)Address already in use: AH00072: make_sock: could not bind t....0:80 Apr 10 06:56:40 <maskediphere> httpd[30696]: no listening sockets available, shutting down Apr 10 06:56:40 <maskediphere> httpd[30696]: AH00015: Unable to open logs Apr 10 06:56:40 <maskediphere> systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE Apr 10 06:56:40 <maskediphere> systemd[1]: Failed to start The Apache HTTP Server. Apr 10 06:56:40 <maskediphere> systemd[1]: Unit httpd.service entered failed state. Apr 10 06:56:40 <maskediphere> systemd[1]: httpd.service failed.
How To Reproduce: Using the ssl.conf code (linked below), run the command "sudo systemctl restart httpd
".
Output of this command: Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.
Desired behaviour: The Apache server should restart, but the server is not restarting despite the fact that the Apache server (httpd service) is actually running on the machine.
I've tried many things so far including:
- Ensuring my certificate is named as a .pem file
- Same .pem file reference is in my ssl.conf file in /etc/httpd/conf.d/ directory
- Commented out the SSLCertificateKeyFile
Resources:
- ssl.conf file code
- List of available running services on each port: List of available running services on each port