3 Questions about Apache, Let's Encrypt and Subdomains


i’am very new to linux and hosting and so on and the tutorials here on the page are very very great. Thank u for that i’ve learned so much the last days! But now i getting stuck a bit with some questions i cant find.

  1. Apache

I want to setup Nextcloud, Couchpotato, Bookmarkservice and some other litte things. The goal is to setup each service in \var\www<servicename>. Do i have to configure in apache2.conf a ServerAlias for each service?(also watch question No3 please)

  1. Let’s Encrypt

I setup my certbot like this:

sudo certbot --authenticator standalone --installer apache -d <> -d <> --pre-hook "service apache2 stop" --post-hook "service apache2 stop"

Now i struggle with the renew of the certificate.

if i run sudo certbot renew --dry-run to test if renew works correct i get the following output:

Attempting to renew cert ( from /etc/letsencrypt/renewal/ produced an unexpected error: Problem binding to port 80: Could not bind to IPv4 or IPv6.. Skipping.
All renewal attempts failed. The following certs could not be renewed:
  /etc/letsencrypt/live/ (failure)

First i thought its ufw but Ports are open:

sudo ufw app list
Available applications:
  Apache Full
  Apache Secure

The goal is to renew certificate without restarting any service if possible.

  1. Subdomains

As mentioned in Question No1 i like to setup different services. As far as i understand by now is that i have to configure A records. But what i have to do that e.g. refers to and to and so on?

Hope there is somebody who can help me out with this questions. Keep up the work!

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.


Regarding question 1, you would need to create separate Virtual Hosts, you can do that by following the steps here:

Regarding question2, in order for Let’s Encrypt to issue the certificate, the A record of the domain name needs to point to the IP address of your server.

Question 3, yes once you have configured your Apache VHosts, then you have to point the A records of your subdomains to the server IP address.

Regards, Bobby