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.
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)
- Let’s Encrypt
I setup my certbot like this:
sudo certbot --authenticator standalone --installer apache -d <mydomain.com> -d <www.mydomain.com> --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 (mydomain.com) from /etc/letsencrypt/renewal/mydomain.com.conf 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/mydomain.com/fullchain.pem (failure)
First i thought its ufw but Ports are open:
sudo ufw app list Available applications: Apache Apache Full Apache Secure OpenSSH
The goal is to renew certificate without restarting any service if possible.
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. nextcloud.mydomain.com refers to mydomain.com/nextcloud and couchpotato.mydomain.com to mydomain.com/couchpotato and so on?
Hope there is somebody who can help me out with this questions.
Keep up the work!