Reference: http://www.cnblogs.com/yanghuahui/archive/2012/06/25/2561568.html
Http://www.linuxidc.com/Linux/2011-11/47477.htm
http://blog.csdn.net/sean_cd/article/details/38738599
Nginx-v
See if Nginx's SSL configuration is –with-http_ssl_module. If you do not find –with-http_ssl_module This compilation parameter, the description is not supported. Nginx default is not support SSL, need to join the –with-http_ssl_module parameter recompile.
Apt-get Install OpenSSL
cd/etc/nginx/
Create a server private key, and the command will let you enter a password:
OpenSSL genrsa-des3-out Server.key 1024
Create a certificate for the signing request (CSR)
OpenSSL Req-new-key server.key-out SERVER.CSR
Remove the required password when loading SSL-supported Nginx and using the above private key:
OpenSSL rsa-in server.key-out Server_nopwd.key
The last token certificate uses the above private key and the CSR
OpenSSL x509-req-days 365-in server.csr-signkey server_nopwd.key-out server.crt
Vi/etc/nginx/nginx.conf
In the HTTP segment, add:
server {
#listen 80;
Listen 443;
server_name yourservername;
Root/var/mypagedir;
Index index.php index.html index.htm;
SSL on;
SSL_CERTIFICATE/ETC/NGINX/SERVER.CRT;
Ssl_certificate_key/etc/nginx/server_nopwd.key;
}
Restart Niginx
Service Nginx Restart
Put a Web page file in/var/mypagedir, access validation is successful
The above describes Ubuntu using Nginx configuration HTTPS server, including the aspects of the content, I hope that the PHP tutorial interested in a friend helpful.