Micro-channel small free program HTTPS certificate request to build a tutorial (2) --- install and use SSL HTTPS access

Continue connected to a http://blog.csdn.net/mybelief321/article/details/54429314

On an SSL certificate that we have acquired and downloaded to the local, and now to my server, for example, to install an SSL certificate to the server and supports HTTPS access.

My cloud server system version is Ubuntu 14.04.5 LTS, installed a web server is Nginx, generally two CA files server.key SSL and put under server.pem copy of the directory to the root directory of Nginx

My nginx default installation directory is / etc / nginx, in the following figure you can see I have these two files copied to the CA installation directory nginx

Then use the command: sudo vim sites-available / default editing configuration files

Before finding items default configuration file https server, as no modifications

FIG modified according to the following, where https php function to support, we must add location ~. * \. Php {} this period, wherein location ~. * \. Contents inside php {}, you can refer to the default file top of the http server configuration items

Modify finished here, you can use the command: sudo nginx -s reload restart nginx service

After the restart can be done using https://yourdomain.com visit your site. If access php appear directly download the file in question, it may be your browser cache problem, not a problem you have configured, you can clear your browser cache or try another browser.

/************************************************************************************************ 

* For reprint, please retain this content.

 * Article link: http: //blog.csdn.net/mybelief321/article/details/54561974

*************************************************************************************************/

Published 143 original articles · won praise 161 · Views 1.21 million +

Guess you like

Origin blog.csdn.net/mybelief321/article/details/54561974