Chiang has just been helping customers to build a new Oneinstack LNMP Web site environment to deploy an SSL certificate, the customer is the purchase of Namecheap paid SSL certificate, paid 9 dollars a year. So, with this article, whether we have the same environmental needs, but the whole process can also be referenced to follow.
First, Oneinstack Add/new site
The code is as follows |
Copy Code |
CD Oneinstack
./vhost.sh
|
Use the command, and then follow the prompts to deploy the Web site.
According to the Setup Wizard, we set y need to install SSL and then follow the prompts to deploy SSL information which is not very important, but according to the actual fill. Then it will be almost similar to the previous article.
After deployment, we can see the key and CSR file locations We need because we need to use the namecheap to get the SSL certificate, where we can download the local backup.
After deployment here, if we are a new site can be directly to the empty site CMS deployment, if it is migrating data, Chiang Kai-shek first customers in other space programs and databases migrated in, anyway, at least the original address with HTTPS URL can be opened. After the SSL certificate has been acquired, we can force HTTPS to be used when setting up the configuration file.
Second, NAMECHEAP Activation/Obtain SSL certificate
NAMECHEAP provides a POSITIVESSL certificate of 9 dollars a year, the customer bought one, although there are many Third-party free SSL certificates can be selected, but sometimes in the consideration of some special factors or the purchase fee is more appropriate.
After purchasing the Namecheap SSL certificate, we need to go to the background product list to see what we pictured above, and then click Active Activation.
Here we need to post the server CSR file that was captured in the first link, and then select the server environment we need to deploy to in server type. Primary Domain No matter he will automatically get our domain name. Click Submit submission to see all domain name information, check no problem click Next to continue.
2, verify domain name information
Here you need to choose to verify personal information, here I choose to verify the mailbox, if we need to verify the domain name WHOIS before the privacy protection can be seen, because the mailbox is important, the following SSL certificate will be sent over.
3, fill in personal information
Here we need to fill out the certificate of personal information, if it is the company to fill out truthfully, if it is an individual, in the name of the companies fill Na, other according to the actual filling can be.
Then fill in the mailbox and use it to accept the SSL certificate.
4, check the information submitted
We check the information, the main domain name and mailbox is not our submission, if not on the amendment, if no problem to submit confirmation.
5. Activate get SSL Certificate
Wait a few minutes, and then we can see the mailbox get the information.
After you receive such a message, click here and enter the following code string.
After activation, Chiang continued to wait, waiting for the SSL certificate to be sent to the mailbox.
Third, download Namecheap SSL certificate and deploy to site
Wait a minute or so, you can see the Namecheap SSL certificate sent to the mailbox, a ZIP compression package.
We can see these two files. Let's start with a merge and put the code in the bundle copy into the CRT. Then replace the merged file with the first step, remember to have a CRT in the/usr/local/nginx/conf/directory? Yes, that's right, replace him.
Four, restart Nginx effective
The code is as follows |
Copy Code |
Service Nginx Relaod
|
In this way, we can see that using Oneinstack to deploy the Namecheap SSL certificate everything is OK.
V. Oneinstack Deployment SSL Certificate Summary
In the old Chiang tribe these days also shared several methods of SSL deployment, basically the method is almost the same, but with oneinstack environment directly generate a few file paths, and then we generate files directly after the replacement can be, the last restart Nginx can be effective, The whole process is still relatively simple.