Skip to content

Instantly share code, notes, and snippets.

@yuezhu
Last active October 13, 2023 17:03
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yuezhu/cd951df69d0c70da4251faf414a82e92 to your computer and use it in GitHub Desktop.
Save yuezhu/cd951df69d0c70da4251faf414a82e92 to your computer and use it in GitHub Desktop.
Enable HTTPS for Transmission on Synology
# Create nginx config /etc/nginx/conf.d/www.transmission.conf
# sudo synoservice --restart nginx
location /transmission {
if ($scheme = http) {
return 301 https://$http_host$request_uri;
}
auth_basic "Server Restricted";
auth_basic_user_file /etc/nginx/conf.d/.htpasswd;
allow 192.168.1.1;
allow 192.168.1.192/28;
deny all;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_pass_header X-Transmission-Session-Id;
proxy_buffering off;
proxy_redirect off;
add_header Front-End-Https on;
proxy_pass http://localhost:9091/transmission;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment