2017-12-19, 11:05
(2017-12-17, 23:10)Klouse Wrote: Hi,Here is what I use:
can somebody please help my with my https nginx reverse proxy?
The best working location i could write was:
Code:
location /jsonrpc {
proxy_pass http://kodi;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
auth_basic "Restricted Access";
auth_basic_user_file /etc/nginx/.secure/.kodi.htpasswd;
access_log /var/log/nginx/kodi.access.log;
error_log /var/log/nginx/kodi_https.error.log;
}
but i'd love to have it under /kodi/jsonrpc,
maybe somebody already did it?
Thank you!
regards,
Klaus
javascript:
# Kodi MacMini
location /kodi_mac_mini_NYCdtQ6KsFGAmWung3aqR7SHZUhxryEkbciV8P9BpPmSqtRKG83DiWYMy2vHn4wuEbCrgUNd/ {
deny all;
allow 192.168.1.0/24;
# here I include a list of Amazon IPs (optional)
# include /etc/nginx/conf.d/blockips.conf;
# when setting up "allow all", when happy it works, you can start to lock it down to certain IPs
# allow all;
# the local IP and port of the Kodi install I want to forward to:
proxy_pass http://192.168.1.123:8282/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
I use a random string for the location. You can add multiple locations to forward to different boxes.
Make sure you set the subpath in kodi.config
javascript:subpath = kodi_mac_mini_NYCdtQ6KsFGAmWung3aqR7SHZUhxryEkbciV8P9BpPmSqtRKG83DiWYMy2vHn4wuEbCrgUNd
Good luck