Avatar of MDNA
MDNA

asked on 

How do I set up the necessary DNS records to point to a specific port

I'm running Windows server 03.

"domain.com" points to our server, connecting to apache on the regular port 80. While "domain.com:8080" connects to an ASP.NET site on IIS. I want use "otherdomain.com" to point to the ASP.NET site.

I assumed I could do it in an A record, but it seems not...any help is appreciated
DNSMicrosoft IIS Web ServerApache Web Server

Avatar of undefined
Last Comment
tigermatt
Avatar of tigermatt
tigermatt
Flag of United Kingdom of Great Britain and Northern Ireland image

You cannot use DNS to achieve this. DNS is simply responsible for translating the "domain.com" into the correct IP address in order to locate the server on the Internet/network. It has no awareness of ports, protocols or subdirectories.

To get around this, you either keep appending :8080 to the domain name. Alternatively, you can create a new subdomain (aspnetsite.domain.com) which is mapped to the server also on port 80. You can then configure IIS to listen for the aspnetsite.domain.com, and Apache to listen just for domain.com.

The final solution is to use domain.com/aspnetsite, with a redirect on /aspnetsite to automatically send the user to :8080.

-tigermatt
Avatar of MDNA
MDNA

ASKER

Thanks for the reply. I was wondering, what about SRV records? It seems that might do the trick.
Avatar of MDNA
MDNA

ASKER

... or using a host header? Of course, I only know of these things, not how to use them yet.
ASKER CERTIFIED SOLUTION
Avatar of tigermatt
tigermatt
Flag of United Kingdom of Great Britain and Northern Ireland image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of Chris Dent
Chris Dent
Flag of United Kingdom of Great Britain and Northern Ireland image


Hey guys,

While a SRV Record allows definition of a Port it won't work for you here. You need your application to know how to query a Service Record to retrieve that information, your web browser certainly cannot.

Chris
Avatar of tigermatt
tigermatt
Flag of United Kingdom of Great Britain and Northern Ireland image

I thought so, thanks Chris.

Host Headers are still the way to go!
Avatar of tigermatt
tigermatt
Flag of United Kingdom of Great Britain and Northern Ireland image

Alternatively, and a much better solution, would be for you to get a second IP address and use that on one of your sites. That would allow you to completely separate the incoming requests, should the host header approach fail to work. I'd try host headers first, but if they don't work, you'd need a second IP, with either the aspnetsite.domain.com or the domain.com site being configured to send requests across to the second IP instead.

Then, you can either configure the router so that requests on port 80 of the new IP go to port 8080 on the server, or you configure the server to listen on the new IP on one site, the old on the other. I would recommend the former approach; I like that one compared with the latter. :-)

-tigermatt
Avatar of tigermatt
tigermatt
Flag of United Kingdom of Great Britain and Northern Ireland image

Any news, MDNA?
Avatar of MDNA
MDNA

ASKER

I had some trouble getting the headers to work. Admittedly, I didn't try very hard, but I was getting short on time. So I decided to get rid of Apache.  It took me a while to get IIS set up to serve up cgi and php files but everything seems to be working now. Funny thing is it probably took me longer to do what I did, than to use host headers.

Thanks for your help.
Avatar of tigermatt
tigermatt
Flag of United Kingdom of Great Britain and Northern Ireland image

Just having IIS running for both sites should reduce future complications and any issues between web servers, anyway.
Microsoft IIS Web Server
Microsoft IIS Web Server

IIS is Internet Information Services, the web server included with Windows Server operating systems. All current versions are built on a modular architecture; modules can be added or removed individually so that those required for specific functionality are installed. The full installation of IIS includes HTTP, security, content, compression, caching, logging and diagnostics.

36K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo