How to configure certbot on Bitnami Lamp Stack?

I am using a Bitnami LAMP stack on AWS. I have multiple subdomains running on different ports. How do i configure certbot to automatically install the SSL Certificates?

I tried this:

chmod a+x certbot-auto

Here is the error:

Failed to find apache2ctl in PATH:
Certbot doesn’t know how to automatically configure the web server on this system. However, it can still get a certificate for you. Please run “certbot-auto certonly” to do so. You’ll need to manually configure your web server to use the resulting certificate.

Since apache is installed at /opt/bitnami/apache2, i guess certbot is not finding apache.

What is the solution for this?

certbot needs port 80 or 443 to confirm ownership of a domain, so if you are running on different ports this is not possible.

You could however use the DNS-01 challenge, which requires a token to be added to your DNS records as proof of ownership - if that works for you.

@serverco the issue is not of ports or sub domains. I can;t get certbot-auto to work. I tried “certbot-auto certonly”, chose temporary web server and got the certificate.

But i want to use auto functionality so that i need not do this manually to renew the certificates.


I understand that the error above is nothing to do with ports or subdomains. I was simply pointing out that even if you take the trouble, and go through the process, of overcoming the initial issues of getting certbot to run on your Bitnami LAMP setup - it won’t issue you certificates for subdomains which only work on different ports ( not 80 or 443).

I am hopefully wrong, but I don’t believe that the “auto” function will work on your configuration, however with a little scripting you should be able to get something that works without you manually having to renew.

@serverco Thanks for the clarification. But can i run certbot certonly to get certificates for multiple subdomains by using a temporary web server option ?

It asked me to enter list of domains to get the SSL for. Can i add my subdomains here as well ?

Yes, you should be able to add the subdomains to the list, and obtain a certificate which applies to all of your subdomains, then use that cert in the configuration for each of your subdomains.

You could potentially do it separately for each subdomain if you wanted to as well.

@serverco Thank you. I just tested it and i was able to get the cert for my sub-domain as well.

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