ドメインを取得して comodo 社のFREESSLで発行してそれぞれ任意の場所に置く
http { log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log /var/log/nginx/access.log main; sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; types_hash_max_size 2048; include /etc/nginx/mime.types; default_type application/octet-stream; # Load modular configuration files from the /etc/nginx/conf.d directory. # See http://nginx.org/en/docs/ngx_core_module.html#include # for more information. include /etc/nginx/conf.d/*.conf; index index.php index.html index.htm;# Settings for a TLS enabled server. # Settings for a TLS enabled server. server{ listen 443 ssl; listen [::]:443 ssl; server_name testnanashi2.tk; root /var/www/html; ssl on; #ssl_certificate "/etc/pki/nginx/testnanashi2cat.crt"; ssl_certificate "/etc/pki/nginx/temp.crt"; ssl_certificate_key "/etc/pki/nginx/private/myserver.key"; #ここから # It is *strongly* recommended to generate unique DH parameters # Generate them with: openssl dhparam -out /etc/pki/nginx/dhparams.pem 2048 # ssl_dhparam "/etc/pki/nginx/dhparams.pem"; #ここまでは人間のことばなのでコメントアウトしたままでいい ssl_session_cache shared:SSL:1m; ssl_session_timeout 10m; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers HIGH:SEED:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!RSAPSK:!aDH:!aECDH:!EDH-DSS-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA:!SRP; ssl_prefer_server_ciphers on; # Load configuration files for the default server block. include /etc/nginx/default.d/*.conf; location / { } error_page 404 /404.html; location = /40x.html { } error_page 500 502 503 504 /50x.html; location = /50x.html { } location ~ \.php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /var/www/html/$fastcgi_script_name; include fastcgi_params; } # deny access to .htaccess files, if Apache's document root # concurs with nginx's one # location ~ /\.ht { deny all; } } }
となる 今回証明書が4枚来たがそれぞれルート証明書と2種類の中間証明書の内一つは不要 (opt + command + i) でキャッシュ無効処理ができる