Hello the name of our domain changes, so I changed the name of the domain.old with the domain.new in the website panel of Websites But when I redirect the domain.old to the domain.new in Aliasdomains the rediection does not work. domain.old remains active and not redirected to domain.new.
both domains work domain.old and domain.new and send to the same drupal site. I think the problem comes from elsewhere
But that's exactly what shall happen when you have one domain as website domain and the other as alias domain. Technically, there is no difference between the main domain of the site and the alias domains, they are just two equal names for the same website. What the site itself displays or if it directs domain A to domain B when you enter domain A depends on your CMS. So, you must change the domain in Drupal, as I mentioned. If you configured any additional redirects, either in ISPConfig or in a .htaccess file, then you must change them as well.
I managed to get around this redirection problem. However, there is probably a problem I think I messed up the .vhosts files of /etc/apache2/site-enables/ Indeed, I did not find how to automatically renew the Let's Encrypt certificates generated by the ISPConfig interface. I then used the Cerbot command and configured a CrontTab (to automatically renew them). How can I properly delete the Cerbot-generated certificates and set up automatic renewal of Let's Encrypt certificates from the ISpconfig interface?
sudo certbot delete --cert-name server.domain.tld just tick the 'letsencrypt ssl' checkbox in the website settings. as long as everything is correct (all dns records exist and point to the correct server) it'll create, and apply the certificates for you, and they'll renew automatically. you don't need to do anything else.
Do you have any files with -le in the file name in sites-enabled or sites-available folder? If yes, these were created certbot and and cause now any actions and config for the site to be blocked. Also, take care to remove any cronjobs you created for certbot, they will cause proper removal to fail, too. As mentioned by @nhybgtvfr , all certs get renewed automatically, no manual config needed. And to create them, all you have to do is to enable Let's encrypt checkbox and SSL checkbox of a site. In case this fails, see Let's Encrypt error FAQ post.
Check if you have any files with -le in the file name there. Like somedomain.com-le.vhost or sinilar.
I deleted the cerbot and the crontab, apache is now crashed. Here is the error systemctl status apache2.service apache2.service - The Apache HTTP Server Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Fri 2025-01-10 14:31:26 CET; 12s ago Docs: https://httpd.apache.org/docs/2.4/ Process: 986764 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE) CPU: 96ms Jan 10 14:31:26 server1 systemd[1]: Starting The Apache HTTP Server... Jan 10 14:31:26 server1 apachectl[986767]: AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/sites-enabled/000-ispconfig.vhost:7 Jan 10 14:31:26 server1 apachectl[986767]: AH00526: Syntax error on line 171 of /etc/apache2/sites-enabled/100-alamanon.fr.vhost: Jan 10 14:31:26 server1 apachectl[986767]: SSLCertificateFile: file '/etc/letsencrypt/live/domain.com/fullchain.pem' does not exist or is empty Jan 10 14:31:26 server1 apachectl[986764]: Action 'start' failed. Jan 10 14:31:26 server1 apachectl[986764]: The Apache error log may have more information. Jan 10 14:31:26 server1 systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE Jan 10 14:31:26 server1 systemd[1]: apache2.service: Failed with result 'exit-code'. Jan 10 14:31:26 server1 systemd[1]: Failed to start The Apache HTTP Server.
Delete the symlink /etc/apache2/sites-enabled/100-alamanon.fr.vhost, start Apache, then enable SSL and Let's Encrypt checkbox in that website again.