Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Configuration to use nginx as reverse proxy for Transmission BT with SSL/HTTP2 protected with auth
upstream transmission {
server; #Transmission
server {
listen 443 ssl http2;
auth_basic "Server Restricted";
auth_basic_user_file /var/www/myWebSite/web/.htpasswd;
# Path to the root of your installation
error_log /var/www/myWebSite/logs/error.log;
access_log /var/www/myWebSite/logs/access.log;
### SSL cert files ###
ssl_certificate /var/www/myWebSite/ssl/advert.crt;
ssl_certificate_key /var/www/myWebSite/ssl/advert.key;
### Add SSL specific settings here ###
ssl_session_timeout 10m;
ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
location / {
return 301 https://$server_name/transmission/;
location ^~ /transmission {
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;
add_header Front-End-Https on;
location /transmission/rpc {
proxy_pass http://transmission;
location /transmission/web/ {
proxy_pass http://transmission;
location /transmission/upload {
proxy_pass http://transmission;
location /transmission/web/style/ {
alias /usr/share/transmission/web/style/;
location /transmission/web/javascript/ {
alias /usr/share/transmission/web/javascript/;
location /transmission/web/images/ {
alias /usr/share/transmission/web/images/;
location /transmission/ {
return 301 https://$server_name/transmission/web;
Copy link

nebulakl commented Mar 27, 2018

Does not work reliably with
Breaks Mobile UI and Original UI


Copy link

lightmaster commented Mar 9, 2020

Did not work for me as written above, it would only show some text with none of the JavaScript or styles. Once I commented out the /style, /JavaScript, and /image parts it worked perfectly.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment