krlaboratories

how install Cloudflare origin SSL/TLS on OpenLiteSpeed

Feb 22nd, 2022 (edited)
573
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.89 KB | None | 0 0
  1. 1. Go to Cloudflare console and follow SSL/TLS -> Origin Server -> Create certificate
  2. Copypaste two .PEM files: 'Origin Certificate' and 'Private Key'
  3. 2. Go to /usr/local/lsws/conf/cert/ on your server and create 2 files:
  4. - /privatekey.pem
  5. - /certificate.pem
  6. 3. Go to OpenLiteSpeed WebAdmin CP and follow VirtualHost -> SSL and edit block "SSL Private Key & Cerificate":
  7. Private Key File    /usr/local/lsws/conf/cert/privatekey.pem
  8. Certificate File    /usr/local/lsws/conf/cert/certificate.pem
  9. Save.
  10. 4. Go to the OpenLiteSpeed WebAdmin CP Listeners -> SSL and add new domain listener: domain.com, www.domain.com, *
  11. Go to the SSL settings and put the same, that for VirtualHost.
  12. Save.
  13. 5. Restart LiteSpeed Server (systemctl restart lsws)
  14. 6. Go to CloudFlare console and setup:
  15. - SSl -> Overview and enable "Full Strict" mode.
  16. - SSL -> Origin Server and enable "Authenticated Origin Pulls".
  17.  
  18. Profit.
Advertisement
Add Comment
Please, Sign In to add comment