Reputation: 490
I'm currently in the process of setting up a media server for my dorm floor. I installed Subsonic, which runs on port 4040 of my server at [domain]. Right now to access the media on subsonic, you have to go to [domain]:4040 Is there a way to make an address on my server can be used to access this port, for example: [domain]/media is equivalent to [domain]:4040 My server is running Ubuntu Server 11.10, with Apache.
Thanks.
Upvotes: 1
Views: 720
Reputation: 3381
I don't know what listen to your 4040 port, the streaming server or a web interface to the server? If it is a web interface, mod_proxy will do the trick like larsks said, however it does not work for every TCP protocol (list of supported protocol in documentation link provided by larsks).
If it does not work the only way is to create a subdomain that redirect to a different IP that is owned by the server and use a firewall rule to redirect traffic going to this ip to 4040 port.
Regards
Upvotes: 0
Reputation: 311586
Sure. Apache's mod_proxy
will do exactly what you want -- take a request coming in on one port and forward it to another. Something as simple as the following might do the trick:
<Location /media/>
ProxyPass http://localhost:4040
ProxyPassReverse http://localhost:4040
</Location>
You can read more in the mod_proxy documentation.
Upvotes: 1