Nginx 反向代理 Transmission

Transmission 的网页端,默认是开在 9091 端口的,但有时会有其他需求,须通过 Nginx 来代理转发相关请求。

此时可用以下相关配置来完成。

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_pass_header X-Transmission-Session-Id;

    location /transmission/rpc {
        proxy_pass http://127.0.0.1:9091;
    }

    location /transmission/web/ {
        proxy_pass http://127.0.0.1:9091;
    }

    location /transmission/upload {
        proxy_pass http://127.0.0.1:9091;
    }
}

此时访问 /transmission/web/ 路径即可打开 Transmission 控制页面。

参考链接:https://tsukkomi.org/post/set-ngxin-https-reverse-proxy-to-transmission-web-ui