goal
- https 연결하기
ubuntu 기준입니다
As a prerequisite, you are required to install certutil, a command-line utility that can create and modify certificate and key databases before you can install mkcert utility.
$ sudo apt install libnss3-tools -y
Once the installation of certutil is done, download the mkcert binary from Github and install it as shown below
$ wget https://github.com/FiloSottile/mkcert/releases/download/v1.1.2/mkcert-v1.1.2-linux-amd64
$ mv mkcert-v1.1.2-linux-amd64 mkcert
$ chmod +x mkcert
$ sudo cp mkcert /usr/local/bin/
Now that the mkcert utility is installed, run the command below to generate your local CA.
$ mkcert -install
Then, You can see below
Using the local CA at "/home/jungeundelilahlee/.local/share/mkcert" ✨
$ mkdir -p .cert
.root > .cert > cert.pem/key.pem
"scripts": {
"start": "HTTPS=true SSL_CRT_FILE=./.cert/cert.pem SSL_KEY_FILE=./.cert/key.pem react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
npm start
Then, you can see https secure website now!