goloap
goloap

Reputation: 126

Redirecting traffic to other webserver

Here is my setup: I have a Python webserver (written myself) that listens on port 80 and also have the Transmission-daemon (bittorrent client) that provides a webUI on port 9101. (running on Linux)

I can access both webservers locally without problems, but now would like to access them externally also. My issue is that I would prefer not to have to open extra ports on my firewall to access the Transmission webUI. Is it possible to within the python webserver to redirect some traffic to the appropriate port.

So for example: http: //mywebserver/index.html -> served by the Python webserver
http: //mywebserver/transmission.html -> redirected to transmission (which is currently http: //localhost:9101)

Thanks

Upvotes: 1

Views: 595

Answers (2)

goloap
goloap

Reputation: 126

I found my answer: a reverse proxy. It will take care of the routing to the correct port based on the URL. I now just have to select the right one there are so many (NginX, pound, lighttd etc...)

Thanks anyway.

Upvotes: 2

pylover
pylover

Reputation: 8065

Return an http response with status code 300, see this

Upvotes: 0

Related Questions