일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
- DOM Parser
- php
- Google Cloud
- MariaDB
- Certbot
- home page
- Xdebug
- crontab
- git pull
- launch.json
- child theme
- front page
- Liniux
- root
- centos
- LetsEncrypt
- wordpress
- https
- Mac
- new user
- Apache
- Fail2ban
- Linux
- non-www
- CentOS7
- vscode
- mysql
- html
- 구글 클라우드
- SSL
- Today
- Total
between 0 and 1
[Server] SSL for Localhost (Local Development Environment) 본문
[Server] SSL for Localhost (Local Development Environment)
devxpert.yoon 2021. 1. 3. 18:51-
Local SSL development (for localhost)
-
1) create Certificate authority (CA) for local machine
$> openssl req -x509 -nodes -new -sha256 -days 1024 -newkey rsa:2048 -keyout RootCA.key -out RootCA.pem -subj "/C=US/CN=Example-Root-CA" $> openssl x509 -outform pem -in RootCA.pem -out RootCA.crt |
-
2) create Domain name certificate
-
create a domains.ext file with following contents
authorityKeyIdentifier=keyid,issuer |
-
3) Generate localhost.key, localhost.csr, and localhost.crt
$> openssl req -new -nodes -newkey rsa:2048 -keyout localhost.key -out localhost.csr -subj "/C=US/ST=YourState/L=YourCity/O=Example-Certificates/CN=localhost" $> openssl x509 -req -sha256 -days 1024 -in localhost.csr -CA RootCA.pem -CAkey RootCA.key -CAcreateserial -extfile domains.ext -out localhost.crt |
-
4) update https-vhost.conf
SSLEngine on SSLCertificateFile "CERTIFICATE/PATH/localhost.crt" SSLCertificateKeyFile "CERTIFICATE/PATH/localhost.key" |
-
5) register CA on machine (Mac OS)
-
Run “Keychnin Access” -> Default Keychains (login) -> All Items
-
drag and drop "localhost.crt" file on "keychain access window"
-
find added "localhost.crt" and double click
-
In Trust tab, change "when using this certificate" value to "always trust"
-
'Software Development Engineering > Dev.Info.' 카테고리의 다른 글
[Git] Adding an existing project to GitHub (기존 프로젝트 깃허브에 올리기) (0) | 2021.01.26 |
---|---|
[VSCode] git pull - There is no tracking information for the current branch (0) | 2021.01.24 |
[Apache] Redirect HTTP -> HTTPS and Remove "www" (0) | 2021.01.03 |
운영체제별 데몬 시작/중지/등록 명령어 (daemon command for each os) (0) | 2021.01.03 |
유튜브(Youtube) 썸네일 주소 (0) | 2019.04.12 |