# Problems renewing Let's Encrypt Certificate

**URL:** <https://community.letsencrypt.org/t/problems-renewing-lets-encrypt-certificate/185618>\
**Category:** Help\
**Created:** [October 4, 2022, 11:39am UTC](https://community.letsencrypt.org/t/problems-renewing-lets-encrypt-certificate/185618 "2022-10-04T11:39:08Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![MikeMcQ](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/mikemcq/32/52772_2.png) [@MikeMcQ](https://community.letsencrypt.org/u/MikeMcQ)\
**Post date:** [October 4, 2022, 2:09pm UTC](https://community.letsencrypt.org/t/problems-renewing-lets-encrypt-certificate/185618/21 "2022-10-04T14:09:57Z")

</div>

keith looks fine. What is contents of n8

```nohighlight
/etc/apache2/sites-available/n8.conf

```

---

<div class="post-metadata">

**Author:** ![erik1](https://avatars.discourse-cdn.com/v4/letter/e/8e8cbc/32.png) [@erik1](https://community.letsencrypt.org/u/erik1)\
**Post date:** [October 4, 2022, 2:11pm UTC](https://community.letsencrypt.org/t/problems-renewing-lets-encrypt-certificate/185618/22 "2022-10-04T14:11:09Z")

</div>

this was a test (once), I'll delete that site

is it ok to do a2dissite n8.conf?

---

<div class="post-metadata">

**Author:** ![MikeMcQ](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/mikemcq/32/52772_2.png) [@MikeMcQ](https://community.letsencrypt.org/u/MikeMcQ)\
**Post date:** [October 4, 2022, 2:12pm UTC](https://community.letsencrypt.org/t/problems-renewing-lets-encrypt-certificate/185618/23 "2022-10-04T14:12:34Z")

</div>

> [@erik1](#):
>
> is it ok to do a2dissite n8.conf?

Yes, if it is not used that is good idea.

To the next one. What is this

```nohighlight
/etc/apache2/sites-available/nietmetmij-le-ssl.conf

```

---

<div class="post-metadata">

**Author:** ![erik1](https://avatars.discourse-cdn.com/v4/letter/e/8e8cbc/32.png) [@erik1](https://community.letsencrypt.org/u/erik1)\
**Post date:** [October 4, 2022, 2:15pm UTC](https://community.letsencrypt.org/t/problems-renewing-lets-encrypt-certificate/185618/24 "2022-10-04T14:15:56Z")

</div>

that file is empty now (it says 0 bytes, it wasn't empty a couple hours ago) I don't know what I did wrong,  
but the site is not working anymore atm, probably because the apache restart I did, just before you said shoudn't restart (yet).

---

<div class="post-metadata">

**Author:** ![MikeMcQ](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/mikemcq/32/52772_2.png) [@MikeMcQ](https://community.letsencrypt.org/u/MikeMcQ)\
**Post date:** [October 4, 2022, 2:18pm UTC](https://community.letsencrypt.org/t/problems-renewing-lets-encrypt-certificate/185618/25 "2022-10-04T14:18:01Z")

</div>

No, the restart should not have done that. Could you have spelled it wrong?  
What does this show?

```nohighlight
ls -l /etc/apache2/sites-available/n*

```

---

<div class="post-metadata">

**Author:** ![erik1](https://avatars.discourse-cdn.com/v4/letter/e/8e8cbc/32.png) [@erik1](https://community.letsencrypt.org/u/erik1)\
**Post date:** [October 4, 2022, 2:23pm UTC](https://community.letsencrypt.org/t/problems-renewing-lets-encrypt-certificate/185618/26 "2022-10-04T14:23:41Z")

</div>

no, because I'm using Midnight Commander, I really see the files in the folder (and nietmetmij-le-ssl.conf sais 0 bytes)

---

<div class="post-metadata">

**Author:** ![erik1](https://avatars.discourse-cdn.com/v4/letter/e/8e8cbc/32.png) [@erik1](https://community.letsencrypt.org/u/erik1)\
**Post date:** [October 4, 2022, 2:24pm UTC](https://community.letsencrypt.org/t/problems-renewing-lets-encrypt-certificate/185618/27 "2022-10-04T14:24:43Z")

</div>

> [@MikeMcQ](#):
>
> `ls -l /etc/apache2/sites-available/n*`

Your command says:

-rw-r--r-- 1 root root 1846 mrt 21 2022 /etc/apache2/sites-available/n8.conf  
-rw-r--r-- 1 root root 2084 mrt 17 2022 /etc/apache2/sites-available/nietmetmij.conf  
-rw-r--r-- 1 root root 0 okt 4 15:14 /etc/apache2/sites-available/nietmetmij-le-ssl.conf

---

<div class="post-metadata">

**Author:** ![MikeMcQ](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/mikemcq/32/52772_2.png) [@MikeMcQ](https://community.letsencrypt.org/u/MikeMcQ)\
**Post date:** [October 4, 2022, 2:27pm UTC](https://community.letsencrypt.org/t/problems-renewing-lets-encrypt-certificate/185618/28 "2022-10-04T14:27:24Z")

</div>

Do you have a backup of that file? Because it was not zero bytes about an hour ago in your post #7. Apache does not update config files it only reads them.

Also, you previously had a file named `notariaatnijlen.conf`. That now seems missing. Did you do that on purpose?

---

<div class="post-metadata">

**Author:** ![erik1](https://avatars.discourse-cdn.com/v4/letter/e/8e8cbc/32.png) [@erik1](https://community.letsencrypt.org/u/erik1)\
**Post date:** [October 4, 2022, 2:28pm UTC](https://community.letsencrypt.org/t/problems-renewing-lets-encrypt-certificate/185618/29 "2022-10-04T14:28:11Z")

</div>

that notariaatfile is a copy/paste so I didn't paste it in the last post

---

<div class="post-metadata">

**Author:** ![erik1](https://avatars.discourse-cdn.com/v4/letter/e/8e8cbc/32.png) [@erik1](https://community.letsencrypt.org/u/erik1)\
**Post date:** [October 4, 2022, 2:28pm UTC](https://community.letsencrypt.org/t/problems-renewing-lets-encrypt-certificate/185618/30 "2022-10-04T14:28:57Z")

</div>

but, in the meantime I created a nietmetmij-le-ssl.conf  
(a mix od nietmetmij.conf and keith-le-ssl.conf )

---

<div class="post-metadata">

**Author:** ![erik1](https://avatars.discourse-cdn.com/v4/letter/e/8e8cbc/32.png) [@erik1](https://community.letsencrypt.org/u/erik1)\
**Post date:** [October 4, 2022, 2:29pm UTC](https://community.letsencrypt.org/t/problems-renewing-lets-encrypt-certificate/185618/31 "2022-10-04T14:29:37Z")

</div>

```nohighlight

<IfModule mod_ssl.c>
<VirtualHost *:443>

        # The ServerName directive sets the request scheme, hostname and port that
        # the server uses to identify itself. This is used when creating
        # redirection URLs. In the context of virtual hosts, the ServerName
        # specifies what hostname must appear in the request's Host: header to
        # match this virtual host. For the default virtual host (this file) this
        # value is not decisive as it is used as a last resort host regardless.
        # However, you must set it for any further virtual host explicitly.
        #ServerName www.example.com

        ServerName nietmetmij.be
        ServerAlias www.nietmetmij.be
        DocumentRoot /var/www/nietmetmij

        WSGIScriptAlias / /var/www/nietmetmij/flask/my_flask_app.wsgi

        <Directory /var/www/nietmetmij/flask/>
                Options FollowSymLinks
                AllowOverride None
                Require all granted
        </Directory>

        <Directory /var/www/nietmetmij/cgi-bin>
            Options ExecCGI
            SetHandler cgi-script
        </Directory>

        <Directory /var/www/nietmetmij>
            Options +ExecCGI
            AddHandler cgi-script .py
        </Directory>

        # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
        # error, crit, alert, emerg.
        # It is also possible to configure the loglevel for particular
        # modules, e.g.
        #LogLevel info ssl:warn

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        # For most configuration files from conf-available/, which are
        # enabled or disabled at a global level, it is possible to
        # include a line for only one particular virtual host. For example the
        # following line enables the CGI configuration for this host only
        # after it has been globally disabled with "a2disconf".
        #Include conf-available/serve-cgi-bin.conf

RewriteEngine on
# Some rewrite rules in this file were disabled on your HTTPS site,
# because they have the potential to create redirection loops.

# RewriteCond %{SERVER_NAME} =nietmetmij.be [OR]
# RewriteCond %{SERVER_NAME} =www.nietmetmij.be
# RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]

Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/nietmetmij.be/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/nietmetmij.be/privkey.pem

</VirtualHost>
</IfModule>

```

---

<div class="post-metadata">

**Author:** ![MikeMcQ](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/mikemcq/32/52772_2.png) [@MikeMcQ](https://community.letsencrypt.org/u/MikeMcQ)\
**Post date:** [October 4, 2022, 2:33pm UTC](https://community.letsencrypt.org/t/problems-renewing-lets-encrypt-certificate/185618/32 "2022-10-04T14:33:55Z")

</div>

> [@erik1](#):
>
> ```nohighlight
> SSLCertificateFile /etc/letsencrypt/live/nietmetmij.be/fullchain.pem
> SSLCertificateKeyFile /etc/letsencrypt/live/nietmetmij.be/privkey.pem
> 
> ```

OK, good you recovered the file but the cert file names are wrong. If you look back at the certbot certificates output this cert has a "-0001" in the name. So, you need to change these to:

```nohighlight
SSLCertificateFile /etc/letsencrypt/live/nietmetmij.be-0001/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/nietmetmij.be-0001/privkey.pem

```

Something must have gone slightly wrong when creating certs for this domain earlier. I am not worried about that right now. Just want to get your sites running right now. We might come back to that later.

When that is done, please show contents of

```nohighlight
/etc/apache2/sites-available/notariaatnijlen.conf

```

Want to see this even though it has no cert. Want to ensure no interference with others.

---

<div class="post-metadata">

**Author:** ![erik1](https://avatars.discourse-cdn.com/v4/letter/e/8e8cbc/32.png) [@erik1](https://community.letsencrypt.org/u/erik1)\
**Post date:** [October 4, 2022, 2:35pm UTC](https://community.letsencrypt.org/t/problems-renewing-lets-encrypt-certificate/185618/33 "2022-10-04T14:35:05Z")

</div>

> [@MikeMcQ](#):
>
> `-0001`

I'll  
adissite notariaat.conf too

---

<div class="post-metadata">

**Author:** ![MikeMcQ](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/mikemcq/32/52772_2.png) [@MikeMcQ](https://community.letsencrypt.org/u/MikeMcQ)\
**Post date:** [October 4, 2022, 2:37pm UTC](https://community.letsencrypt.org/t/problems-renewing-lets-encrypt-certificate/185618/34 "2022-10-04T14:37:11Z")

</div>

OK for notaria, just the last one and we'll test config

Show:

```nohighlight
/etc/apache2/sites-available/vectrex-le-ssl.conf

```

---

<div class="post-metadata">

**Author:** ![erik1](https://avatars.discourse-cdn.com/v4/letter/e/8e8cbc/32.png) [@erik1](https://community.letsencrypt.org/u/erik1)\
**Post date:** [October 4, 2022, 2:37pm UTC](https://community.letsencrypt.org/t/problems-renewing-lets-encrypt-certificate/185618/35 "2022-10-04T14:37:20Z")

</div>

a2dissite notariaat.conf is done and the

-0001 was added in the nietmetmij-le-ssl.conf

---

<div class="post-metadata">

**Author:** ![erik1](https://avatars.discourse-cdn.com/v4/letter/e/8e8cbc/32.png) [@erik1](https://community.letsencrypt.org/u/erik1)\
**Post date:** [October 4, 2022, 2:38pm UTC](https://community.letsencrypt.org/t/problems-renewing-lets-encrypt-certificate/185618/36 "2022-10-04T14:38:44Z")

</div>

again, vectrex-le-ssl.conf is an empty file !  
(it seems my computer knows what was important for me and decided to delete these files, well not delete, but they are empty ..)

---

<div class="post-metadata">

**Author:** ![MikeMcQ](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/mikemcq/32/52772_2.png) [@MikeMcQ](https://community.letsencrypt.org/u/MikeMcQ)\
**Post date:** [October 4, 2022, 2:39pm UTC](https://community.letsencrypt.org/t/problems-renewing-lets-encrypt-certificate/185618/37 "2022-10-04T14:39:24Z")

</div>

OK, well, I guess you need to make that one too. Ouch. I'll wait

---

<div class="post-metadata">

**Author:** ![erik1](https://avatars.discourse-cdn.com/v4/letter/e/8e8cbc/32.png) [@erik1](https://community.letsencrypt.org/u/erik1)\
**Post date:** [October 4, 2022, 2:44pm UTC](https://community.letsencrypt.org/t/problems-renewing-lets-encrypt-certificate/185618/38 "2022-10-04T14:44:02Z")

</div>

```nohighlight

<IfModule mod_ssl.c>
<VirtualHost *:443>
        # The ServerName directive sets the request scheme, hostname and port that
        # the server uses to identify itself. This is used when creating
        # redirection URLs. In the context of virtual hosts, the ServerName
        # specifies what hostname must appear in the request's Host: header to
        # match this virtual host. For the default virtual host (this file) this
        # value is not decisive as it is used as a last resort host regardless.
        # However, you must set it for any further virtual host explicitly.
        #ServerName www.example.com

        ServerName vectrex.be
        ServerAlias www.vectrex.be
        DocumentRoot /var/www/vectrex

        <Directory /var/www/vectrex>
            DirectoryIndex index.html
            AllowOverride All
            Order allow,deny
            Allow from all
        </Directory>

        <Directory /var/www/vectrex/cgi-bin>
            Options ExecCGI
            SetHandler cgi-script
        </Directory>

        <Directory /var/www/vectrex>
            Options +ExecCGI
            AddHandler cgi-script .py
        </Directory>

        # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
        # error, crit, alert, emerg.
        # It is also possible to configure the loglevel for particular
        # modules, e.g.
        #LogLevel info ssl:warn

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        # For most configuration files from conf-available/, which are
        # enabled or disabled at a global level, it is possible to
        # include a line for only one particular virtual host. For example the
        # following line enables the CGI configuration for this host only
        # after it has been globally disabled with "a2disconf".
        #Include conf-available/serve-cgi-bin.conf
RewriteEngine on

RewriteEngine on
# Some rewrite rules in this file were disabled on your HTTPS site,
# because they have the potential to create redirection loops.

# RewriteCond %{SERVER_NAME} =vectrex.be [OR]
# RewriteCond %{SERVER_NAME} =www.vectrex.be
# RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]

Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/vectrex.be/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/vectrex.be/privkey.pem
</VirtualHost>
</IfModule>

```

---

<div class="post-metadata">

**Author:** ![MikeMcQ](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/mikemcq/32/52772_2.png) [@MikeMcQ](https://community.letsencrypt.org/u/MikeMcQ)\
**Post date:** [October 4, 2022, 2:45pm UTC](https://community.letsencrypt.org/t/problems-renewing-lets-encrypt-certificate/185618/39 "2022-10-04T14:45:20Z")

</div>

Hurray! Looks good. Now let's see if the config is OK. Still, do not restart Apache yet though. Just this test.

```nohighlight
sudo apache2ctl -t -D DUMP_VHOSTS

```

---

<div class="post-metadata">

**Author:** ![erik1](https://avatars.discourse-cdn.com/v4/letter/e/8e8cbc/32.png) [@erik1](https://community.letsencrypt.org/u/erik1)\
**Post date:** [October 4, 2022, 2:47pm UTC](https://community.letsencrypt.org/t/problems-renewing-lets-encrypt-certificate/185618/40 "2022-10-04T14:47:02Z")

</div>

> [@MikeMcQ](#):
>
> `sudo apache2ctl -t -D DUMP_VHOSTS`

root@h2955757:/etc/apache2/sites-available# sudo apache2ctl -t -D DUMP\_VHOSTS  
VirtualHost configuration:  
\*:443 is a NameVirtualHost  
default server blijf-in-uw-kot.be (/etc/apache2/sites-enabled/biuk-le-ssl.conf:2)  
port 443 namevhost blijf-in-uw-kot.be (/etc/apache2/sites-enabled/biuk-le-ssl.conf:2)  
alias www.blijf-in-uw-kot.be  
port 443 namevhost keith.be (/etc/apache2/sites-enabled/keith-ssl.conf:2)  
alias www.keith.be  
port 443 namevhost nietmetmij.be (/etc/apache2/sites-enabled/nietmetmij-le-ssl.conf:2)  
alias www.nietmetmij.be  
port 443 namevhost vectrex.be (/etc/apache2/sites-enabled/vectrex-le-ssl.conf:2)  
alias www.vectrex.be  
\*:80 is a NameVirtualHost  
default server [h2955757.stratoserver.net](http://h2955757.stratoserver.net) (/etc/apache2/sites-enabled/000-default.conf:1)  
port 80 namevhost [h2955757.stratoserver.net](http://h2955757.stratoserver.net) (/etc/apache2/sites-enabled/000-default.conf:1)  
port 80 namevhost blijf-in-uw-kot.be (/etc/apache2/sites-enabled/biuk.conf:1)  
alias www.blijf-in-uw-kot.be  
port 80 namevhost nietmetmij.be (/etc/apache2/sites-enabled/nietmetmij.conf:1)  
alias www.nietmetmij.be  
port 80 namevhost vectrex.be (/etc/apache2/sites-enabled/vectrex.conf:1)  
alias www.vectrex.be

[Previous page](https://community.letsencrypt.org/t/problems-renewing-lets-encrypt-certificate/185618.md?page=1)

[Next page](https://community.letsencrypt.org/t/problems-renewing-lets-encrypt-certificate/185618.md?page=3)
