nginx で全ての http 接続を https にリダイレクトする

● nginx で全ての http 接続を https にリダイレクトする

/etc/nginx/conf/xxxxxxx.conf

server {
    listen 80;

    # http を https にリダイレクト( ↓ この行を追加する )
    return 301 https://$host$request_uri;

    ..........
}

● nginx のリスタート

nginx -s reload
No.1571
08/10 10:37

edit