Transmission Web Interface Reverse Proxy

1. The problem I’m having:

Reverse proxy with transmission web interface doesn’t work. Would like some help if possible :slight_smile:

2. Error messages and/or full log output:

Connection failed
Could not connect to the server. You may need to reload the page to reconnect.

curl -v transmission.connormorse.com
*   Trying [2606:4700:3035::6815:107b]:80...
* Connected to transmission.connormorse.com (2606:4700:3035::6815:107b) port 80 (#0)
> GET / HTTP/1.1
> Host: transmission.connormorse.com
> User-Agent: curl/8.0.1
> Accept: */*
>
< HTTP/1.1 308 Permanent Redirect
< Date: Fri, 14 Jul 2023 22:03:28 GMT
< Content-Length: 0
< Connection: keep-alive
< Location: https://transmission.connormorse.com/
< CF-Cache-Status: DYNAMIC
< Report-To: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=tU4mYe6XijL%2FKNyoDTW3vF5abtzG7JR32SZLeQkwOU1SEe%2FDzt58OKaVQ1qq5%2BwgKCCswkiFlvKYqjXd9qGgrdn8J103zFD2O1s6msD8TGL6C9%2FYh9e%2F5B%2BeNBTLLcVHsZwLOI8xFwL2WFWcc6E0ChVclyQDaCglP7LP"}],"group":"cf-nel","max_age":604800}
< NEL: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
< Server: cloudflare
< CF-RAY: 7e6d0e4d7f39dd23-LHR
< alt-svc: h3=":443"; ma=86400
<
* Connection #0 to host transmission.connormorse.com left intact


3. Caddy version:

v2.6.4

4. How I installed and ran Caddy:

Chocolatey

a. System environment:

Windows, running in CMD

b. Command:

Caddy start

c. Service/unit/compose file:

d. My complete Caddy config:

{
	email connormorse@yahoo.co.uk
}

connormorse.com {

	root C:/CaddyV2

	log {
		output file D:/Documents/test.log
	}

	reverse_proxy /radarr* localhost:7878
	reverse_proxy /readarr* localhost:8787
	reverse_proxy /sonarr* localhost:8989
	reverse_proxy /prowlarr* localhost:9696
	reverse_proxy /bazarr* localhost:6767
	reverse_proxy /tautulli* localhost:65333
	reverse_proxy /calibre* localhost:8082
	
	reverse_proxy /calibre-web* http://localhost:8083 {
		header_up X-Script-Name /calibre-web
	}
    	
	redir /qbit /qbit/
    	handle_path /qbit/* {
        	reverse_proxy localhost:8081
    	}

}

request.connormorse.com {
	reverse_proxy localhost:5055
}


transmission.connormorse.com {
	reverse_proxy localhost:9091
}

connormorse.com/ombi {
	root C:/CaddyV2
	file_server
}

5. Links to relevant resources:

Similar issue to:

Please completely fill out the help topic template. What’s in your logs? What do you see when you make a request with curl -v?

Thanks for the response, apologies I have added more info now. Hopefully this is enough to start somewhere :slight_smile:

You made an HTTP request and got an HTTP->HTTPS redirect as a response. That’s working correctly.

Please try again with https://. That’s what we care to test.

Please enable the debug global option and share your Caddy logs.

Curl reequest:

curl -v https://transmission.connormorse.com
*   Trying 104.21.16.123:443...
* Connected to transmission.connormorse.com (104.21.16.123) port 443 (#0)
* schannel: disabled automatic use of client certificate
* ALPN: offers http/1.1
* ALPN: server accepted http/1.1
* using HTTP/1.1
> GET / HTTP/1.1
> Host: transmission.connormorse.com
> User-Agent: curl/8.0.1
> Accept: */*
>
< HTTP/1.1 301 Moved Permanently
< Date: Sat, 15 Jul 2023 17:38:57 GMT
< Content-Type: text/html; charset=ISO-8859-1
< Transfer-Encoding: chunked
< Connection: keep-alive
< access-control-allow-origin: *
< alt-svc: h3=":443"; ma=86400
< location: /transmission/web/
< CF-Cache-Status: DYNAMIC
< Report-To: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=fWItK%2FB26Cl8fxkjqU7OoGpEm%2FTpi4h4RXLxw1eXw8XBBlx0rHDhx2mgEt8dNdG4Nfbqcrq%2Fhen6iCUJZdNLWVGqtna%2F7EgT%2FChTt6Iixfk3HxiRj1A3QdNc7jxHREDxpk2oarYTyBUUlpGotltk"}],"group":"cf-nel","max_age":604800}
< NEL: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
< Server: cloudflare
< CF-RAY: 7e73c8368a62dcbf-LHR
<
<h1>301: Moved Permanently</h1>* Connection #0 to host transmission.connormorse.com left intact

Debug section:

2023/07/15 17:57:01.312 ←[35mDEBUG←[0m  http.handlers.reverse_proxy     selected upstream       {"dial": "localhost:9091", "total_upstreams": 1}
2023/07/15 17:57:01.312 ←[35mDEBUG←[0m  http.handlers.reverse_proxy     upstream roundtrip      {"upstream": "localhost:9091", "duration": 0, "request": {"remote_ip": "172.69.79.183", "remote_port": "31704", "proto": "HTTP/2.0", "method": "POST", "host": "transmission.connormorse.com", "uri": "/transmission/rpc", "headers": {"Cf-Ipcountry": ["GB"], "Cf-Visitor": ["{\"scheme\":\"https\"}"], "Origin": ["https://transmission.connormorse.com"], "Accept-Encoding": ["gzip"], "User-Agent": ["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"], "Content-Length": ["24"], "Accept": ["*/*"], "Content-Type": ["application/json"], "Sec-Ch-Ua-Platform": ["\"Windows\""], "Pragma": ["no-cache"], "Sec-Ch-Ua-Mobile": ["?0"], "Accept-Language": ["en-GB,en;q=0.9,ru-RU;q=0.8,ru;q=0.7,en-US;q=0.6"], "Sec-Ch-Ua": ["\"Not.A/Brand\";v=\"8\", \"Chromium\";v=\"114\", \"Google Chrome\";v=\"114\""], "Cdn-Loop": ["cloudflare"], "Cf-Ray": ["7e73e2addcbd3601-MAN"], "Sec-Fetch-Site": ["same-origin"], "X-Forwarded-For": ["172.69.79.183"], "Sec-Fetch-Mode": ["cors"], "X-Forwarded-Host": ["transmission.connormorse.com"], "Cf-Connecting-Ip": ["2a02:c7c:8862:e700:e0b7:6412:46d9:e2a"], "X-Forwarded-Proto": ["https"], "Referer": ["https://transmission.connormorse.com/transmission/web/"], "Cache-Control": ["no-cache"], "Sec-Fetch-Dest": ["empty"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": "transmission.connormorse.com"}}, "headers": {"Server": ["Transmission"], "Access-Control-Allow-Origin": ["*"], "Date": ["Sat, 15 Jul 2023 17:57:01 GMT"], "Content-Length": ["561"], "Content-Type": ["text/html; charset=ISO-8859-1"]}, "status": 421}

Your debug logs show that your upstream app responds with status 421. Sounds like this is a misconfiguration of your upstream app: "421: Misdirected Request" when connecting remotely · transmission/transmission · Discussion #1941 · GitHub, not a problem with Caddy in particular.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.