Answer the question
In order to leave comments, you need to log in
How to bypass ERR_CERT_DATE_INVALID when setting up a site on LAN?
Hello.
I am building a local site. Now I need it to work over https from all devices within the local network. To do this, I generated certificates using mkcert. Locally, on the computer on which it was generated, the site opens, everything is fine.
But when I try to access the site from another device within the local network, the ERR_CERT_DATE_INVALID error appears.
I found the root certificate and registered it in the apache2 settings
[email protected]:~/ssl$ mkcert -CAROOT
/home/lzrdrt/.local/share/mkcert
[email protected]:~/ssl$ ls -la /home/lzrdrt/.local/share/mkcert
итого 16
drwxr-xr-x 2 lzrdrt lzrdrt 4096 янв 10 23:21 .
drwxrwxr-x 10 lzrdrt lzrdrt 4096 янв 17 00:30 ..
-r-------- 1 lzrdrt lzrdrt 2484 янв 10 23:21 rootCA-key.pem
-rw-r--r-- 1 lzrdrt lzrdrt 1647 янв 10 23:21 rootCA.pem
<VirtualHost *:443>
ServerName 192.168.1.4
ServerAdmin [email protected]
DocumentRoot /var/www/html
SSLEngine on
SSLCertificateChainFile /home/lzrdrt/ssl/rootCA.pem
SSLCertificateFile /home/lzrdrt/ssl/pepega.com.pem
SSLCertificateKeyFile /home/lzrdrt/ssl/pepega.com-key.pem
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Answer the question
In order to leave comments, you need to log in
Do not engage in collective farming, but just get a certificate from LetsEncrypt
If there is a real need (which happens, IMHO, quite rarely) for it to work on several devices, distribute the root certificate that was used to sign. But in general, if there are not dozens of devices, it's easier to add them to the exceptions by hand.
In general, it is quite possible to test without encryption, adding it at the stage of publishing on the Internet. Well, or, as correctly noted above, issue a valid certificate for the domain via LE, it is especially convenient in this case to confirm via DNS.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question