ooooooooooooooK, nice response :)
this my How to for free :
Install Nginx :
sudo apt-get isntall nginx
Install autosigned certificat :
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/nginx-selfsigned.key -out /etc/ssl/certs/nginx-selfsigned.crt
sudo openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048
ok so now install u config files on nginx :
nano /etc/nginx/sites-available/default
server {
listen 80;
# server_name tvheadend.domaine.fr;
server_name 192.168.50.28;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl http2; #Nginx > 1.9.5
# server_name tvheadend.domaine.fr;
server_name 192.168.50.28;
# Le reste de votre conf
## Certificates
ssl_certificate /etc/ssl/certs/nginx-selfsigned.crt;
ssl_certificate_key /etc/ssl/private/nginx-selfsigned.key;
## Protocol
ssl_protocols TLSv1.2;
## Diffie-Hellman
ssl_ecdh_curve secp384r1;
## Ciphers
ssl_ciphers EECDH+CHACHA20:EECDH+AESGCM:EECDH+AES;
ssl_prefer_server_ciphers on;
# OCSP Stapling
resolver 80.67.169.12 80.67.169.40 valid=300s;
resolver_timeout 5s;
ssl_stapling on;
ssl_stapling_verify on;
## TLS parameters
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 5m;
ssl_session_tickets off;
## HSTS
add_header Strict-Transport-Security "max-age=15552000; includeSubdomains; preload";
location / {
proxy_pass http://192.168.50.28:9981;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
Test de la config :
sudo nginx -t
root@plex:/home/stagiaire# sudo nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
sudo service nginx restart
Last way now is bloc the acess public in http://192.168.50.28:9981
next step LEt's encrypt acess :)
and it's will be OK for me
after i make my key workging in other post :)
thanks u all :)
Webologie :
https://docs.nginx.com/nginx/admin-guide/web-server/reverse-proxy/
https://angristan.fr/configurer-https-nginx/
https://tvheadend.org/d/6266-nginx-reverse-proxy-and-nginxconfig-io-configuration-finally-working
https://www.digitalocean.com/community/tutorials/how-to-create-a-self-signed-ssl-certificate-for-nginx-in-ubuntu-16-04
https://github.com/tvheadend/tvheadend/blob/master/docs/markdown/faqs.md#q-access-tvheadend-through-http-proxy