How do I use certbot with Apache in a Docker container?

Linode Staff

I have Apache running in a Docker container. When I try to use certbot to create an SSL certificate, I receive an error:

Error while running apache2ctl graceful.
httpd not running, trying to start
Action 'graceful' failed.
The Apache error log may have more information.

(98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
(98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down

1 Reply

In order to install an SSL certificate, certbot needs to be able to start a webserver on TCP port 80. It sounds like Apache is already running on port 80, so temporarily stopping or re-binding the Apache container to another port should allow certbot to create the certificate.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct