S
S
Shurik2021-02-14 15:11:03
Apache HTTP Server
Shurik, 2021-02-14 15:11:03

Apache2 why doesn't https work?

Good afternoon. Setting up https on apache2 via lets encrypt.
I generated certificate files, created them in httpd.conf for this domain, but alas, the site does not become accessible via https.
What confuses me. Only Listen 80 is registered in httpd.conf. Listen 443 is registered in the ssl.conf config, but httpd.conf does not enable it.
If, in httpd.conf, next to listen 80, you write Listen 443, then when you restart apache2, an error occurs in the console:

"Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details."


In the console after the command$ systemctl status httpd.service
httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Вс 2021-02-14 16:27:00 MSK; 3s ago
     Docs: man:httpd(8)
           man:apachectl(8)
  Process: 12776 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=0/SUCCESS)
  Process: 11147 ExecReload=/usr/sbin/httpd $OPTIONS -k graceful (code=exited, status=0/SUCCESS)
  Process: 12780 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
 Main PID: 12780 (code=exited, status=1/FAILURE)

фев 14 16:27:00 centos02 systemd[1]: Stopped The Apache HTTP Server.
фев 14 16:27:00 centos02 systemd[1]: Starting The Apache HTTP Server...
фев 14 16:27:00 centos02 httpd[12780]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:443
фев 14 16:27:00 centos02 httpd[12780]: no listening sockets available, shutting down
фев 14 16:27:00 centos02 httpd[12780]: AH00015: Unable to open logs
фев 14 16:27:00 centos02 systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
фев 14 16:27:00 centos02 systemd[1]: Failed to start The Apache HTTP Server.
фев 14 16:27:00 centos02 systemd[1]: Unit httpd.service entered failed state.
фев 14 16:27:00 centos02 systemd[1]: httpd.service failed.

Port 443 is open and used by httpd.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vitaly Karasik, 2021-02-14
@svisch

Show your configs and 'httpd -S' please

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question