and using it certs in webhosts

Discussion in 'General' started by Bocki, Apr 20, 2021.

  1. Bocki

    Bocki Member HowtoForge Supporter

    Hello everybody,
    some time ago I've set up a new machine with Debian 10 and ISPConfig 3.2.2 following the "perfect tutorial", using for LE certificates. Due to some other work I came back to to this machine just now and see the following: seems to work just fine and renews the certs lying in /root/
    But the webhosts use the certs lying for example in /var/www/clients/client1/web1/ssl - and the files from /root/ do not get copied or linked there. Therefore the webhost uses outdated certs, causing the browser to show an error.
    What did I miss or what is not configured as it should?
    Could you give a short explanation, which scripts are called in which order to renew and distribute the LE certs? I didn't even find a cron job to start regularly. Thanks!
  2. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    What is the content of /var/www/clients/client1/web1/ssl ?
    Which cert is used?
  3. Bocki

    Bocki Member HowtoForge Supporter

    [email protected]01:~# ls -al
    total 40
    drwxr-xr-x 3 root root 4096 Jan 12 07:34 .
    drwx------ 8 root root 4096 Jan 12 07:34 ..
    drwxr-xr-x 2 root root 4096 Jan 12 07:34 backup
    -rw-r--r-- 1 root root 1587 Mar 13 00:02 ca.cer
    -rw-r--r-- 1 root root 3799 Mar 13 00:02 fullchain.cer
    -rw-r--r-- 1 root root 2212 Mar 13 00:02
    -rw-r--r-- 1 root root 1004 Mar 13 00:02
    -rw-r--r-- 1 root root 1691 Mar 13 00:02
    -rw-r--r-- 1 root root  218 Mar 13 00:02
    -rw-r--r-- 1 root root 3243 Mar 13 00:02
    [email protected]:~# ls -al /var/www/clients/client1/web1/ssl
    total 16
    drwxr-xr-x  2 root root 4096 Jan 12 07:34 .
    drwxr-xr-x 11 root root 4096 Jan 13 00:04 ..
    -rw-r--r--  1 root root 3799 Jan 12 07:34
    -rw-------  1 root root 3243 Jan 12 07:34
    [email protected]:~# cat /etc/apache2/sites-enabled/
    <VirtualHost *:443>
      <IfModule mod_ssl.c>
                    SSLEngine on
                    SSLProtocol All -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
                    SSLHonorCipherOrder     on
                    # <IfModule mod_headers.c>
                    # Header always add Strict-Transport-Security "max-age=15768000"
                    # </IfModule>
                    SSLCertificateFile /var/www/clients/client1/web1/ssl/
                    SSLCertificateKeyFile /var/www/clients/client1/web1/ssl/
                                      SSLUseStapling on
                      SSLStaplingResponderTimeout 5
                      SSLStaplingReturnResponderErrors off
    Thanks for the quick reply!
  4. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Try the following:
    - Disable LE for the web
    - Go to the SSL tab and select "Delete certificate" as action, then save
    - Enable LE for the web
  5. Bocki

    Bocki Member HowtoForge Supporter

    Thanks, that helped!
    Can you give me some insights how the renewal process and the distribution of the certs work? Thanks!
  6. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    It is automatic. Monitor the log in case some error prevents renew.
    What distribution? Distribution to where?
  7. Steini86

    Steini86 Active Member

    Can you verify that in your /root/ file you have the lines
    This should ensure that your certs are copied to this path after renewal.

    If this is missing, you can tell to copy the files now (and for the future) with
    Code: --install-cert -d -d -d --key-file /var/www/ --fullchain-file /var/www/ --reloadcmd ""
  8. Bocki

    Bocki Member HowtoForge Supporter

    Sorry, I should have been more specific in asking: To be automatic somewhere has to be an automatically executed script. Where is it? I did not find any in /etc/cron.*. And which script takes care of copying from /root/ to
    /var/www/clients/client1/web1/ssl after renewal?
    An answer to this last question gives the following comment now - it is itself:

    Thanks, I'll have a look!

Share This Page