Answer the question
In order to leave comments, you need to log in
How to register a website certificate in Ubuntu?
there is an Ubuntu Server
running two sites on it, one http listens on port 5000, the
other https listens on port 5001
The first site redirects to the second.
if you write in the console, wget http://localhost:5000
it gives out this thing:
Resolving localhost (localhost)... 127.0.0.1
Connecting to localhost (localhost)|127.0.0.1|:5000... connected.
HTTP request sent, awaiting response... 307 Temporary Redirect
Location: https://localhost:5001/ [following]
--2019-07-07 17:13:45-- https://localhost:5001/
Connecting to localhost (localhost)|127.0.0.1|:5001... connected.
ERROR: cannot verify localhost's certificate, issued by ‘CN=localhost’:
Unable to locally verify the issuer's authority.
To connect to localhost insecurely, use `--no-check-certificate'.
sudo apt-get install gnutls-bin
gnutls-cli --print-cert localhost:5001 </dev/null| sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > myserver.crt
sudo cp myserver.crt /usr/local/share/ca-certificates/myserver.crt
sudo update-ca-certificates
Answer the question
In order to leave comments, you need to log in
Add a certificate (presumably self-signed) to the trusted certificate store and make a corresponding link to it in this way:
Where is the store of trusted certificates in bubuntu - I don't know. Usually it is in /etc/ssl/certs, but in el6 it is for example in /etc/pki/tls/certs
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question