Certbot doesn't know how to automatically configure the web server on this system


#1

I’m running :
An EC2 AWS machine.
Setup a Bitnami WordPress installation through the AWS marketplace.

Following this guide here:

I ran the code:

$ wget https://dl.eff.org/certbot-auto
chmod a+x certbot-auto

This ran successfully.

Now in my main folder I have these files:
apps certbot-auto htdocs stack

I can’t seem to run these commangds:
$ ./certbot-auto
Or
$ ./path/to/certbot-auto --apache
Or
$ ./path/to/certbot-auto --apache certonly

The errors are as follows:
$ ./certbot-auto

Another error:
./certbot-auto --apache
img src= https://community.letsencrypt.org/uploads/default/original/2X/4/4f795e686a9917f2570c509b26f67b37d0659de1.png

Another error:
$ ./path/to/certbot-auto --apache certonly
img src= https://community.letsencrypt.org/uploads/default/original/2X/1/181dff2decece7979668e45806e1e8b74cd120a1.png

Please do let me know what I can do to move forward.


#2

Hi @CP30,

Do you have Apache as your web server?

Can you run apache2ctl to control it?


#3

Hi Schoen!
Thanks for responding so quickly.

How would I go about doing that?

And what other information can I provide you to quickly diagnose and solve this issue?


#4

Replied to you below.


#5

@schoen

Tried running $ apache2ctl

Output
The program 'apache2ctl' is currently not installed. You can install it by typing: sudo apt-get install apache2

But I already have Apache/2.4.23 (Unix) installed, so I’m not sure if I should follow through.

Also, just to be clear, I ssh’d into my machine and without switching or cd-ing into any other directories, I ran the certbot commands. Do I have to switch directories for any of this?


#6

Huh! Do you know how Apache was installed on that machine?

What’s the output of dpkg -l apache2?


#7

@schoen

Output of dpkg -l apache2

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
++±============================-===================-===================-=============================================================
ii apache2 2.4.7-1ubuntu4.13 amd64 Apache HTTP Server

After your last reply:

I first ran this: sudo apt-get install apache2

Then ran this: ./certbot-auto --apache -d myDomain.com

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

AH00112: Warning: DocumentRoot [/var/lib/letsencrypt/tls_sni_01_page/] does not exist
AH00558: apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.0.1. Set the ‘ServerName’ directive globally to suppress this message
(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
AH00015: Unable to open logs


#8

I think Bitnami uses custom versions of software like apache, installed to /opt/bitnami. I’m not sure how reliable switching to the Ubuntu version of apache (via apt-get) would be, you’d have to at least stop and disable the custom version first (sorry, no idea how!).

The apache plugin in certbot works best with the versions of apache shipped by Ubuntu (and other distros). If you want to keep using the Bitnami version of apache, you’ll probably need to use the webroot or standalone plugin. You can find some usage examples here (replace certbot with ./certbot-auto). This will require that you manually change your apache configuration to enable HTTPS, Mozilla’s SSL configuration generator might help you with that.


#9

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.