Skip to content

Instantly share code, notes, and snippets.

@azazqadir
Created May 17, 2018 09:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save azazqadir/946b48d187a030e8d1016ee4acc65ac9 to your computer and use it in GitHub Desktop.
Save azazqadir/946b48d187a030e8d1016ee4acc65ac9 to your computer and use it in GitHub Desktop.
Enable SSL Certificate on Custom PHP website

To enable SSL on PHP, you need to install the SSL certificate. If you are doing it using Cloudways, then you can either enable Free SSL by Let's Encrypt on one click from the settings or install custom SSL.

<Files ~ "^\.(htaccess|htpasswd)$">
deny from all
</Files>
RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^(.well-known[/]acme-challenge[/]yoururl)$  index2.php    [NC,L]    # Handle product requests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment