プログラミング備忘録

初級プログラマ。python、DL勉強中

鍵の種類のまとめ

種別

KEY

CSR

  • Certificate Signing Request
  • 公開鍵
  • KEYより作成

CRT

  • Certificate
  • 公開鍵に証明書を付加したもの
  • CSRより作成
  • 三者期間より発行

nginx設定

  • sites-available/default
server {
    # SSL configuration
    #
    listen 443 ssl default_server;
    listen [::]:443 ssl default_server;

    server_name www.example.jp;
    #ssl  on;
    ssl_certificate /wks/authkey/combined.crt ;
    ssl_password_file /wks/authkey/ssl.key/pass.txt;
    ssl_certificate_key /wks/authkey/ssl.key/server.key;
    ssl_session_timeout 2m;
    #ssl_protocols TLSv1;

    root /var/www/html;

    # Add index.php to the list if you are using PHP
    index index.html index.htm index.nginx-debian.html;

    server_name _;

    location / {
        # First attempt to serve request as file, then
        # as directory, then fall back to displaying a 404.
        try_files $uri $uri/ =404;
    }
}

  • conf.d/default.conf
server{
    listen 50000 ;
    listen [::]:50000 ;

    root /wks/html;

    # Add index.php to the list if you are using PHP
    #index index.html index.htm index.nginx-debian.html;

    server_name _;

    #server_name www.example.jp;
    ssl  on;
    ssl_certificate /wks/authkey/combined.crt ;
    ssl_password_file /wks/authkey/ssl.key/pass.txt;
    ssl_certificate_key /wks/authkey/ssl.key/server.key;
    ssl_session_timeout 2m;


    server_name _;

    location / {
        # First attempt to serve request as file, then
        # as directory, then fall back to displaying a 404.
        try_files $uri $uri/ =404;
    }

}