Here's a clear, step-by-step guide for users who want to use a CNAME with SSL using their own server (via NGINX or Apache) when Cloudflare isn't an option.
Use this guide if you want to use a custom subdomain (like video.mydomain.com
) to embed KillerPlayer videos with SSL (https), without using Cloudflare.
Step 1: Add the CNAME Record at Your DNS Provider
Go to your DNS provider and add a CNAME record:
- Type:
CNAME
- Name:
video
(or whatever subdomain you want) - Value:
cname.killerplayer.com
It should point video.mydomain.com
to cname.killerplayer.com
It can take a few minutes to a few hours for the DNS to propagate.
Step 2: Set Up a Reverse Proxy (with SSL)
Here are two options depending on your web server:
Option A: Using NGINX
Install NGINX and Certbot (Let’s Encrypt)
sudo apt update
sudo apt install nginx certbot python3-certbot-nginx
Set up NGINX config for video.mydomain.com
Create a config file (e.g. /etc/nginx/sites-available/killerplayer-proxy.conf
):
server {
listen 80;
server_name video.mydomain.com;
location / {
proxy_pass https://killerplayer.com;
proxy_set_header Host killerplayer.com;
proxy_ssl_verify off;
}
}
Enable it and reload NGINX:
sudo ln -s /etc/nginx/sites-available/killerplayer-proxy.conf /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginx
Get SSL for Your Subdomain
sudo certbot --nginx -d video.mydomain.com
Let’s Encrypt will install a free SSL certificate for your subdomain.
Option B: Using Apache
Enable Modules
sudo a2enmod proxy proxy_http ssl headers
Create Virtual Host for video.mydomain.com
In /etc/apache2/sites-available/video.mydomain.com.conf
:
<VirtualHost *:80>
ServerName video.mydomain.com
Redirect permanent / https://video.mydomain.com/
</VirtualHost>
<VirtualHost *:443>
ServerName video.mydomain.com
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/video.mydomain.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/video.mydomain.com/privkey.pem
ProxyPreserveHost On
ProxyPass / https://killerplayer.com/
ProxyPassReverse / https://killerplayer.com/
Header always set X-Content-Type-Options "nosniff"
</VirtualHost>
Enable the site and restart Apache:
sudo a2ensite video.mydomain.com.conf
sudo systemctl restart apache2
Then get your SSL:
sudo certbot --apache -d video.mydomain.com
Step 3: Add Your Subdomain in KillerPlayer
- Go to your KillerPlayer Dashboard → My Videos.
- Enter your subdomain (e.g.
video.mydomain.com
) in the CNAME field. - Save.