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

**URL:** <https://community.letsencrypt.org/t/certbot-doesnt-know-how-to-automatically-configure-the-web-server-on-this-system/21011>\
**Category:** Help\
**Created:** [October 12, 2016, 3:19pm UTC](https://community.letsencrypt.org/t/certbot-doesnt-know-how-to-automatically-configure-the-web-server-on-this-system/21011 "2016-10-12T15:19:32Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![CP30](https://avatars.discourse-cdn.com/v4/letter/c/85f322/32.png) [@CP30](https://community.letsencrypt.org/u/CP30)\
**Post date:** [October 12, 2016, 3:19pm UTC](https://community.letsencrypt.org/t/certbot-doesnt-know-how-to-automatically-configure-the-web-server-on-this-system/21011/1 "2016-10-12T15:19:32Z")

</div>

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

Following this guide here:

> **[Certbot](https://certbot.eff.org/#ubuntutrusty-apache)**
>
> Automatically enable HTTPS on your website with EFF's Certbot, deploying Let's Encrypt certificates.

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`

 ![](https://global.discourse-cdn.com/letsencrypt/original/2X/5/5852543c88a98e0542ca0a3cdd39e499895fd80e.png)

Another error:  
`./certbot-auto --apache`  
img src= [https://global.discourse-cdn.com/letsencrypt/original/2X/4/4f795e686a9917f2570c509b26f67b37d0659de1.png](https://global.discourse-cdn.com/letsencrypt/original/2X/4/4f795e686a9917f2570c509b26f67b37d0659de1.png)

Another error:  
`$ ./path/to/certbot-auto --apache certonly`  
img src= [https://global.discourse-cdn.com/letsencrypt/original/2X/1/181dff2decece7979668e45806e1e8b74cd120a1.png](https://global.discourse-cdn.com/letsencrypt/original/2X/1/181dff2decece7979668e45806e1e8b74cd120a1.png)

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

---

<div class="post-metadata">

**Author:** ![schoen](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/schoen/32/79_2.png) [@schoen](https://community.letsencrypt.org/u/schoen)\
**Post date:** [October 12, 2016, 5:26pm UTC](https://community.letsencrypt.org/t/certbot-doesnt-know-how-to-automatically-configure-the-web-server-on-this-system/21011/2 "2016-10-12T17:26:38Z")

</div>

Hi @CP30,

Do you have Apache as your web server?

Can you run `apache2ctl` to control it?

---

<div class="post-metadata">

**Author:** ![CP30](https://avatars.discourse-cdn.com/v4/letter/c/85f322/32.png) [@CP30](https://community.letsencrypt.org/u/CP30)\
**Post date:** [October 12, 2016, 5:29pm UTC](https://community.letsencrypt.org/t/certbot-doesnt-know-how-to-automatically-configure-the-web-server-on-this-system/21011/3 "2016-10-12T17:29:44Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![CP30](https://avatars.discourse-cdn.com/v4/letter/c/85f322/32.png) [@CP30](https://community.letsencrypt.org/u/CP30)\
**Post date:** [October 12, 2016, 5:30pm UTC](https://community.letsencrypt.org/t/certbot-doesnt-know-how-to-automatically-configure-the-web-server-on-this-system/21011/4 "2016-10-12T17:30:17Z")

</div>

Replied to you below.

---

<div class="post-metadata">

**Author:** ![CP30](https://avatars.discourse-cdn.com/v4/letter/c/85f322/32.png) [@CP30](https://community.letsencrypt.org/u/CP30)\
**Post date:** [October 12, 2016, 5:40pm UTC](https://community.letsencrypt.org/t/certbot-doesnt-know-how-to-automatically-configure-the-web-server-on-this-system/21011/5 "2016-10-12T17:40:51Z")

</div>

@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?

---

<div class="post-metadata">

**Author:** ![schoen](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/schoen/32/79_2.png) [@schoen](https://community.letsencrypt.org/u/schoen)\
**Post date:** [October 12, 2016, 6:18pm UTC](https://community.letsencrypt.org/t/certbot-doesnt-know-how-to-automatically-configure-the-web-server-on-this-system/21011/6 "2016-10-12T18:18:08Z")

</div>

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

What’s the output of `dpkg -l apache2`?

---

<div class="post-metadata">

**Author:** ![CP30](https://avatars.discourse-cdn.com/v4/letter/c/85f322/32.png) [@CP30](https://community.letsencrypt.org/u/CP30)\
**Post date:** [October 12, 2016, 6:25pm UTC](https://community.letsencrypt.org/t/certbot-doesnt-know-how-to-automatically-configure-the-web-server-on-this-system/21011/7 "2016-10-12T18:25:31Z")

</div>

@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

---

<div class="post-metadata">

**Author:** ![pfg](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/pfg/32/1924_2.png) [@pfg](https://community.letsencrypt.org/u/pfg)\
**Post date:** [October 12, 2016, 7:25pm UTC](https://community.letsencrypt.org/t/certbot-doesnt-know-how-to-automatically-configure-the-web-server-on-this-system/21011/8 "2016-10-12T19:25:01Z")

</div>

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](https://certbot.eff.org/docs/using.html#webroot) (replace `certbot` with `./certbot-auto`). This will require that you manually change your apache configuration to enable HTTPS, [Mozilla’s SSL configuration generator](https://mozilla.github.io/server-side-tls/ssl-config-generator/) might help you with that.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/letsencrypt/original/3X/c/a/ca6c06ea1ea201324bba7048c6841ce60236468d.png) [@system](https://community.letsencrypt.org/u/system)\
**Post date:** [November 11, 2016, 7:33pm UTC](https://community.letsencrypt.org/t/certbot-doesnt-know-how-to-automatically-configure-the-web-server-on-this-system/21011/9 "2016-11-11T19:33:38Z")

</div>

Closed on November 11, 2016, 7:33pm UTC

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