I tried to install HTTPS on current macOS version 15.5 using this way but with no success.
Is there something I’m missing?
http://localhoststill workinghttps://localhostreturns ERR_CONNECTION_REFUSED
I can give you all more information you need, below is the way I tried.
-
I have isntalled current brew version 4.5.2
-
brew install mkcert -
mkcert -install -
sudo nano /etc/ssl/localhost/localhost.conf -
I have put there
[req] default_bits = 1024 distinguished_name = req_distinguished_name req_extensions = v3_req [req_distinguished_name] [v3_req] basicConstraints = CA:FALSE keyUsage = nonRepudiation, digitalSignature, keyEncipherment subjectAltName = @alt_names [alt_names] DNS.1 = localhost -
sudo openssl genrsa -out /etc/ssl/localhost/localhost.key 2048 -
sudo openssl rsa -in /etc/ssl/localhost/localhost.key -out /etc/ssl/localhost/localhost.key.rsa -
sudo openssl req -new -key /etc/ssl/localhost/localhost.key.rsa -subj /CN=localhost -out /etc/ssl/localhost/localhost.csr -config /etc/ssl/localhost/localhost.conf -
sudo openssl x509 -req -extensions v3_req -days 3650 -in /etc/ssl/localhost/localhost.csr -signkey /etc/ssl/localhost/localhost.key.rsa -out /etc/ssl/localhost/localhost.crt -extfile /etc/ssl/localhost/localhost.conf -
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain /etc/ssl/localhost/localhost.crt -
sudo apachectl restart
How to run HTTPS on localhost?