Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a service running on a specific port on a given ip : 12.34.56.78:12345. The server at this IP address is all mine (but not the network, so no switch/router tweaking), and I also have a bunch of domains and DNS server I could use.

Is there a way to build a "shortcut" for this IP:port adress that would be easier for users to remember ? The IP part is not the problem (I can use the domain instead) but the port is.

Ideally, something like a mappting service.mydomain.com => 12.34.56.78:12345 would be perfect, but this is AFAIK not possible.

EDIT: as it seems this was unclear, my question is not targeted to HTTP traffic, but for a TeamSpeak server. Thus, users need to enter 12.34.56.78:12345 in their client when setting things up, and I was wondering if there was a way to make this easier.

share|improve this question

3 Answers 3

up vote 0 down vote accepted

Could you run a "bookmarks" webpage somewhere that has a clickable link with the full Hostname/Port in a anchor tag ie: <a href="protocol://hostname:port">My link</a> to make it easier for users? This only works if the browser or the OS shell has a handler for that URI protocol. (There are instructions online on how to create protocol handlers in Windows Shell)

Mark

share|improve this answer
    
This may be a nice alternative, yes. Thanks ! –  Wookai Dec 3 '09 at 21:29
    
Accepted this answer by lack of better solution... –  Wookai Dec 8 '09 at 15:17

Your "impossible" assumption is right in the context of protocols that use hostnames and not URLs.

A hostname is just a mapping of name to IP address. No application-layer information (TCP ports, etc) is conveyed in a hostname. You're conflating the URL syntax of "protocol://hostname:port" with just hostnames that non-URL-based protocols use.

SRV records are supposed to solve this kind of problem, but very few protocols use SRV RR's to resolve the protocol endpoints. (Which is a shame, really...)

In the context of a the HTTP protocol, you could used a name-based virtual host to do what you're talking about, but then your "port 12345" wouldn't be needed anyway, since name-based virtual hosts exist for the purpose of allowing you to run multiple web server instances on a single IP address and TCP port (typically the well-known HTTP port, 80).

share|improve this answer
    
Thanks for your detailed answer. Unfortunately, the service I was thinking about is a Teamspeak server. Instead of telling users to connect on mydomain.com:14534, I'd better tell them ts.mydomain.com. But it's not that important... –  Wookai Dec 3 '09 at 21:36
    
I'm not familiar with TeamSpeak. From what I'm reading, I'm unclear if you're talking about something the user is going to put in their browser, or if you're talking about the server they specify in the TeamSpeak client. –  Evan Anderson Dec 3 '09 at 21:54
    
Sorry if I was not clear. I'm talking about the server address they will put in their client. –  Wookai Dec 3 '09 at 22:10

You can use apache's mod_proxy to transparently proxy traffic from a "standard" port 80 URL through to your app listening on :12345.

share|improve this answer
    
Could you elaborate on that ? Does this mean I could setup a virtual host to redirect traffic on ts.mydomain.com to mydomain.com:12345 ? –  Wookai Dec 3 '09 at 22:07
    
It wouldn't be a redirect, but rather a true proxy. You'd set up a vhost in apache (say app.example.com) with mod_proxy enabled and configured to proxy traffic through to the "real" URL of the application. Then when someone enters app.example.com in their browser, the traffic will go through the apache vhost, to the real app and back along the same path. Just google mod_proxy, there's a ton of documentation out there on it. –  EEAA Dec 3 '09 at 23:02
    
Oh, I see your edit now, specifying that this is for TS, not HTTP. In this case, mod_proxy won't help you at all. –  EEAA Dec 3 '09 at 23:03

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.