Setup Cloudflare Origin Certificates with Nginx: Difference between revisions
No edit summary |
No edit summary |
||
| (One intermediate revision by the same user not shown) | |||
| Line 4: | Line 4: | ||
vim /etc/ssl/private/cloudflare_key_your-domain.com.pem | vim /etc/ssl/private/cloudflare_key_your-domain.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 | vim /etc/ssl/certs/cloudflare_your-domain.com.pem | ||
| Line 21: | Line 21: | ||
==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]] | |||
Latest revision as of 17:23, 25 July 2022
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.
vim /etc/ssl/private/cloudflare_key_your-domain.com.pem
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
You’ll also want to download Cloudflare Origin Pull certificate. You can download that from the link below:
Set up authenticated origin pulls · Cloudflare SSL docs
Zone-Level — Cloudflare certificate
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.
vim /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.