New site alias is not getting a LetsEncrypt cert

Discussion in 'General' started by Stokesy, Apr 29, 2024.

  1. Stokesy

    Stokesy Member

    Hi
    I have just added a new site alias on ispconfig and made sure to check that the 'Don't add to Let's Encrypt certificate' checkbox is NOT checked. However no SSL cert is being generated for this new domain (as far as I can see) and so I can't access the site.
    > certbot certificates does not list the domain and /etc/letsencrypt/renewal does not contain it...
    For added complication, this site is hosted within a Wordpress multisite, so the alias has to be to the master site and it gets redirected by Wordpress...
    I'm thinking maybe I need to regenerate the certificates to prompt it to create the new one? Any ideas?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

  3. Stokesy

    Stokesy Member

    Thanks Till. I tried to do a
    ispconfig_update.sh --force
    and got the error "Uncaught mysqli_sql_exception: Access denied for user 'root'@'localhost' (using password: YES) in /tmp/update_runner.sh.ecD52Fef7v/install/update.php:258"
    This is on an ispconfig migration and it is the first site I have tried to setup since migrating but this indicates that ispaconfig is having a problem accessing mysql?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    First, running ispconfig_update.sh --force is not a solution for your initial issue. You may run it, but it will likely not make a difference. So instead of doing this, please follow each step of the let#s encrypt FAQ one by one and if you can not figure this out by yourself, the FAQ tells you what to do and post here.

    Regarding the mysql issue, you likely changed the MySQL root password in your database after installing ISPConfig but missed changing it in the file /usr/local/ispconfig7server/lib/mysql_clientdb.conf. This issue is not related to the migration.
     
  5. Stokesy

    Stokesy Member

    thanks for the tip on updating mysql password Till - I will investigate further as suggested.
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    As you mentioned that you migrated the server, check also point 10 of the LE Checklist:

     
  7. Stokesy

    Stokesy Member

    Yeah thanks I already checked that but not an issue. I have worked my way through the FAQ and still haven't got the Cert.
    I tried removing the site alias from ISPConfig and then adding the domain as a standalone site - no matter how many times I tried it kept unchecking the Letsencrypt and SSL checkboxes after it finished.
    Letsencrypt log shows that it 'exits abnormally' because of 'Missing command line flag or config entry for this setting'. THe relevant letsencrypt log (with new domain as domainname.org.uk) looks like this:

    2024-05-01 11:23:02,953:DEBUG:certbot._internal.main:certbot version: 1.21.0
    2024-05-01 11:23:02,953:DEBUG:certbot._internal.main:Location of certbot entry point: /bin/certbot
    2024-05-01 11:23:02,953:DEBUG:certbot._internal.main:Arguments: ['-n', '--text', '--agree-tos', '--cert-name', 'domainname.org.uk', '--authenticator', 'webroot', '--server', 'https://acme-v02.api.letsencrypt.org/directory', '--rsa-key-size', '4096', '--email', '[email protected]', '--webroot-map', '{"domainname.org.uk":"\\/usr\\/local\\/ispconfig\\/interface\\/acme"}']
    2024-05-01 11:23:02,953:DEBUG:certbot._internal.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#apache,PluginEntryPoint#manual,PluginEntryPoint#null,PluginEntryPoint#standalone,PluginEntryPoint#webroot)
    2024-05-01 11:23:02,964:DEBUG:certbot._internal.log:Root logging level set at 30
    2024-05-01 11:23:02,965:DEBUG:certbot._internal.plugins.selection:Requested authenticator webroot and installer None
    2024-05-01 11:23:02,965:DEBUG:certbot._internal.plugins.selection:Single candidate plugin: * webroot
    2024-05-01 11:23:02,965:DEBUG:certbot._internal.plugins.selection:Selected authenticator <certbot._internal.plugins.webroot.Authenticator object at 0x7fe34a66d660> and installer None
    2024-05-01 11:23:02,965:INFO:certbot._internal.plugins.selection:plugins selected: Authenticator webroot, Installer None
    2024-05-01 11:23:03,318:DEBUG:certbot._internal.log:Exiting abnormally:
    2024-05-01 11:23:03,319:ERROR:certbot._internal.log:Missing command line flag or config entry for this setting:
    2024-05-01 11:23:03,820:DEBUG:certbot._internal.main:certbot version: 1.21.0
    2024-05-01 11:23:03,820:DEBUG:certbot._internal.main:Location of certbot entry point: /bin/certbot
    2024-05-01 11:23:03,820:DEBUG:certbot._internal.main:Arguments: ['--domains', 'domainname.org.uk']
    2024-05-01 11:23:03,820:DEBUG:certbot._internal.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#apache,PluginEntryPoint#manual,PluginEntryPoint#null,PluginEntryPoint#standalone,PluginEntryPoint#webroot)
    2024-05-01 11:23:03,829:DEBUG:certbot._internal.log:Root logging level set at 30
    2024-05-01 11:23:03,883:DEBUG:certbot._internal.display.obj:Notifying user: Found the following matching certs:
     
  8. Stokesy

    Stokesy Member

    I guess i need to do the last step in the FAQ - and run it in debug mode...
     
  9. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    I would also try removing current certbot install and reinstall it using snap instead of using apt.
     
  10. Stokesy

    Stokesy Member

    mess - now none of my sites have ssl certs! this is escalating
     
  11. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    If you purge certbot instead of removing it, that may happen, but you could always restore its folder (with all the certs) from your backup.
     
  12. Stokesy

    Stokesy Member

    It's OK - mfor some reason the main site - that to which all the aliases are pointing to - had becom SSL/Letsencrypt unchecked. I rechecked it and now the certs are working again....
     
    ahrasis likes this.

Share This Page