: This article mainly introduces how to enter the password for EnterPEMpassphrase to restart the HTTPS site on NGINX. if you are interested in the PHP Tutorial, refer to it. Openssl rsa-in server. key-out server. key. unsecure
Replace the original key with server. KEY. unsecure
Nginx https/ssl configuration:
Server
{
Listen 443 ssl spdy;
Ssl on;
Ssl_certificate/www/1_xxxx_bundle.crt;
Ssl_certificate_key/www/xx. key;
Ssl_session_timeout 5 m;
Ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
Ssl_prefer_server_ciphers on;
Ssl_ciphers ECDHE-RSA-AES256-GCM-SHA384: ECDHE-RSA-AES128-GCM-SHA256: ECDHE-RSA-AES256-SHA384: ECDHE-RSA-AES128-SHA256: ECDHE-RSA-RC4-SHA: ECDHE-RSA-AES256-SHA: DHE-RSA-AES256-SHA: DHE-RSA-AES128-SHA: RC4-SHA :! ANULL :! ENULL :! EXPORT :! DES :! 3DES :! MD5 :! DSS :! PKS;
Ssl_session_cache builtin: 1000 shared: SSL: 10 m;
# Error_page 404/404 .html;
Include enable-php.conf;
Server_name www.tongxinmao.com;
Index portal. php index. php default.html default.htm default. php;
Root/www
Include dz. conf;
# Error_page 404/404 .html;
Location ~ [^/] \. Php (/| $)
{
# Comment try_files $ uri = 404; to enable pathinfo
Try_files $ uri = 404;
Fastcgi_pass unix:/tmp/php-cgi.sock;
Fastcgi_index index. php;
Include fastcgi. conf;
# Include pathinfo. conf;
}
Location/nginx_status
{
Stub_status on;
Access_log off;
}
Location ~ . * \. (Gif | jpg | jpeg | png | bmp | swf) $
{
Expires 30d;
}
Location ~ . * \. (Js | css )? $
{
Expires 12 h;
}
Access_log/home/wwwlogs/lnmp. log access;
}
You can also add the following code to redirect port 80 to port 443.
- Server {
- Listen 80;
- Server_name xxx.com;
- Rewrite ^ (. *) https: // $ server_name $1 permanent;
- }
The above describes how to Enter PEM pass phrase to Enter the password when NGINX restarts the HTTPS site, including some content. if you are interested in the PHP Tutorial.