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