Setup Cloudflare Origin Certificates with Nginx: Difference between revisions

Created page with "On Ubuntu, run the commands below to create the Private key, Certificate and Origin pull files (3 files in total). Copy and paste each content into the respective file. and save. For the Private key file. run this, then copy and paste the private key given to you into the file and save. sudo nano /etc/ssl/private/cloudflare_key_example.com.pem For the certificate file, run this and copy and paste the certificate content into the file and save. sudo nano /etc/ssl/certs..."
 
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
On Ubuntu, run the commands below to create the Private key, Certificate and Origin pull files (3 files in total). Copy and paste each content into the respective file. and save.
On Ubuntu, run the commands below to create the Private key, Certificate and Origin pull files (3 files in total). Copy and paste each content into the respective file. and save.


For the Private key file. run this, then copy and paste the private key given to you into the file and save.
For the '''Private key''' file. run this, then copy and paste the private key given to you into the file and save.
vim /etc/ssl/private/cloudflare_key_your-domain.com.pem


sudo nano /etc/ssl/private/cloudflare_key_example.com.pem
For the '''certificate file''', run this and copy and paste the certificate content into the file and save.
For the certificate file, run this and copy and paste the certificate content into the file and save.
vim /etc/ssl/certs/cloudflare_your-domain.com.pem


sudo nano /etc/ssl/certs/cloudflare_example.com.pem
You’ll also want to download '''Cloudflare Origin Pull''' certificate. You can download that from the link below:
You’ll also want to download Cloudflare Origin Pull certificate. You can download that from the link below:


[https://developers.cloudflare.com/ssl/origin-configuration/authenticated-origin-pull/set-up Set up authenticated origin pulls · Cloudflare SSL docs]
[https://developers.cloudflare.com/ssl/origin-configuration/authenticated-origin-pull/set-up Set up authenticated origin pulls · Cloudflare SSL docs]


Zone-Level — Cloudflare certificate
===Zone-Level — Cloudflare certificate===
 
Under Zone-level certificate, expand the certificate button, the copy its content.
Under Zone-level certificate, expand the certificate button, the copy its content.


Next, run the commands below to create a origin-pull-ca.pem file, then paste the certificate content into the file below and save.
Next, run the commands below to create a '''origin-pull-ca.pem''' file, then paste the certificate content into the file below and save.
vim /etc/ssl/certs/origin-pull-ca.pem


sudo nano /etc/ssl/certs/origin-pull-ca.pem
Once done, you should have three files. The cloudflare_key_example.com.pem, cloudflare_example.com.pem and origin-pull-ca.pem.
Once done, you should have three files. The cloudflare_key_example.com.pem, cloudflare_example.com.pem and origin-pull-ca.pem.


==Source==
==Source==
*[https://websiteforstudents.com/how-to-setup-cloudflare-origin-certificates-with-nginx-on-ubuntu-16-04-18-04/ websiteforstudents.com]
*[https://websiteforstudents.com/how-to-setup-cloudflare-origin-certificates-with-nginx-on-ubuntu-16-04-18-04/ websiteforstudents.com]
[[Category:Server]]
[[Category:Web Server]]
[[Category:Security]]
[[Category:SSL]]
[[Category:Nginx]]