Jump to content

How to enable HTTPS in KVS tube script


Tech Support

Recommended Posts

Here are some important notes and prerequisites before you start

  • In order to use HTTPS on your site you should purchase SSL certificates for your domain and all subdomains you are using with KVS project. This includes all remote storage servers as well, since any files loaded on your project, including video files should be served via HTTPS to get the full coverage.
  • HTTPS may produce additional load on your server because of additional layer of traffic encryption.
  • If you are using Nginx, HTTPS should be configured at Nginx level. Nginx serves static files and they need to be served via HTTPS as well.
  • All 3rd-party scripts and advertising you are using should support HTTPS as well, otherwise they will trigger warnings in browsers and will distract your users.

 

How to enable HTTPS in KVS tube script

Step 1. Configure SSL at server level for domain and all subdomains you are using for KVS project. This should be done at Nginx level for projects that work via Nginx.

If you are using CDN or remote storage servers, check how HTTPS works for all of them.

NOTE: configuring HTTPS at server level is not covered by this guide. Please refer to Nginx / Apache official documentation on this.

 

Step 2. In admin panel go to Settings -> Storage servers and for each storage server modify URL field to point to https://, e.g.:

https://yourdomain.com/contents/videos

 

Step 3. In /admin/include/setup.php change all URLs to https://. In most cases you only need to change this setting:

$config['project_url']="https://www.kvs-demo.com";

However there can be other settings referring direct URLs as well. So search the whole file for http:// and change all usages to https://.

NOTE: KVS will reset all cache after you change project URL. If you have much traffic on your site, your server may be overloaded for some time until the new cache is populated.

 

Step 4. In main .htaccess file change all URLs to https:// as well. In most cases you will only have this line:

RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]

 

Step 5. Open your site via HTTPS protocol and make sure that everything is displayed correctly. Starting from this point your site will fully work on HTTPS. Go to Plugins -> System audit and run installation and server checks there. You should not have any errors from these 2 checks.

 

Step 6. It is recommended to configure 301 redirect for all HTTP requests to HTTPS so that there is no duplicate content available under different protocols. This redirect should be set globally in Nginx configuration (or Apache configuration if your server is not running under Nginx).

NOTE: configuring redirect at server level is not covered by this guide.

 

Troubleshooting

  1. Design is not displayed properly when using HTTPS. Most probably you didn't switch all static resources to be loaded via https://. Open source code of your page and search for http:// text. Once you located the URL of static resource referred by http://, go to Website UI -> Search in templates in admin panel and try searching for template which renders this URL. Fix to https://.
  2. On some pages browser shows insecure warning. This problem is caused by the same issue as above. Some parts of your page are trying to use resources via insecure HTTP protocol and that's why browser shows the warning.
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...