LoginSignup
0
0

More than 5 years have passed since last update.

SSLのために、certbotでLet’s Encryptから証明書を発行してもらう。

Last updated at Posted at 2018-10-16

Let's Encrypt

公式HP

コマンド

以下、example.comはSSLを発行するドメイン名に変えてください。

# install
yum install epel-release
cd /usr/local/src
wget https://dl.eff.org/certbot-auto
chmod a+x certbot-auto
mv /usr/local/src /usr/local/bin

certbot-auto certonly --manual -d example.com
app.js
const http = require('http');
http.createServer((req, res) => {
  res.writeHead(200, {'Content-Type': 'text/plain'});

  if(req.url == '/.well-known/acme-challenge/***************') {
    res.end('***************.***************');
  }
}).listen(80, () => console.log('80'));
node app

/etc/letsencrypt/live/example.com内に証明書が保存されています。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0