본문 바로가기

개발

node.js(with express) https 적용 2 성공!

1. Let's encrypt(무료 SSL) 설치

 

2. 인증서 설치

 

3. greenlock-express 설치/세팅

var server = grrenlock.create({
  version: 'v02',
  configDir: '/etc/letsencrypt',
  server: 'https://acme-v02.api.letsencrypt.org/directory',
  email: '***@gmail.com',
  approveDomains: ['www.homeauctionmap.com', 'homeauctionmap.com'], //my url, domain
  agreeTos: true,
  renewWithin: 90 * 24 * 60 * 60 * 1000,
  renewBy: 89 * 24 * 60 * 60 * 1000,
  app: app
}).listen(80, 443);  //80포트 443포트로 rediret

 

참조

https://jsp-dev.tistory.com/entry/Express-letsencrypt%EB%A5%BC-%EC%82%AC%EC%9A%A9%ED%95%98%EC%97%AC-https-%EC%A0%81%EC%9A%A9%ED%95%98%EA%B8%B0

불러오는 중입니다...

 

https://www.npmjs.com/package/greenlock-express

 

greenlock-express

Free SSL and managed or automatic HTTPS for node.js with Express, Koa, Connect, Hapi, and all other middleware systems.

www.npmjs.com

 

'개발' 카테고리의 다른 글

node.js(with express) https 적용 시도  (0) 2019.07.25
크롤링 Selenium Chrome 에러  (0) 2019.07.06