Hosting Multiple Websites on Windows 2003 Server w/ IIS6

  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

For some time I've been wanting to host several websites on one Windows 2003 Server running IIS. I've found several tutes and think I have the setup down for creating them in IIS Manager.

Where, I'm lost is routing. Most likely the easiest thing for me would probably be to set up Host-Header routing. But I'm really confused when it comes to name servers and setting up DNS.

Scenario / example:

My primary domain -- mydomain.com -- is registered with Network Solutions.
I have a static IP and a business account with my ISP.
The name servers for my primary domain are:
NS43.WORLDNIC.COM 205.178.190.22
NS44.WORLDNIC.COM 205.178.144.22

Internally I run one webserver which is also my DNS server.
In the DNS server I have a www entry for forward and reverse lookup that resolve to the default website.

Now I also have two other domain names that I own, both registered and currently parked at Godaddy.

What I need to know is what name servers to point them to. I don't think I can point them to the worldnic servers as they wouldn't know where to route it. I'm thinking I should add an NS1 and NS2 forward and reverse entry in my DNS server and then use the following for my domain names at Godaddy

ns1.mydomain.com {my static IP here}
ns2.mydomain.com {my static IP here}

Is this correct? If not, how should I go about it?
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • dyfrin
  • Expert
  • Expert
  • User avatar
  • Posts: 503
  • Loc: WI

Post 3+ Months Ago

I am not sure what godaddy gives you for options for name hosting.
With ipower, what I would do is move all domain names to ipower, which will then let you insert into their DNS server the addresses for each of your domains.

example.
So your physical IIS address is 118.24.28.201
all 3 domains should point to that address all 3 domains are under one cpanel at ipower and their DNS is the auth.

Host header will work, the only thing to watch out for is no www. prior to the domain.

Apache actually works better with vhosts imo.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

I did see your post earlier dyfrin, but it really didn't help me much. I can't alter my setup from the way it is.
  • max45
  • Born
  • Born
  • max45
  • Posts: 3

Post 3+ Months Ago

I don't think that godaddy will give you the privilege. There is no meaning buying a hosting from godaddy as they haven't developed their servers yet. They are good enough for domain selling not as a webhost. Their slow service and poor quality host is really putting them down day by day.
  • spork
  • Brewmaster
  • Silver Member
  • User avatar
  • Posts: 6252
  • Loc: Seattle, WA

Post 3+ Months Ago

max45 wrote:
I don't think that godaddy will give you the privilege. There is no meaning buying a hosting from godaddy as they haven't developed their servers yet. They are good enough for domain selling not as a webhost. Their slow service and poor quality host is really putting them down day by day.


Nobody here is talking about GoDaddy web hosting; only DNS entries for domains hosted there.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

To clarify, the extra domains were purchased at Godaddy and are currently parked there (not hosted there). I intend to host them on my own server. I basically need to know how to configure things to point those names to my server so they will resolve correctly.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

I very much need to make this happen and could really use some advice.
Thanks
  • mindfullsilence
  • Professor
  • Professor
  • User avatar
  • Posts: 854

Post 3+ Months Ago

hm, perhaps it has to do with url forwarding. You set up the domain, as you have already done. Then in your domain account, you set the url forwarding to a subdirectory of your server. I'll ask my partner about this and see if he can get a little more detail about the DNS - that goes beyond my scope of expertise (I'm just a designer). I should have an answer for you by tonight.
  • Daemonguy
  • Moderator
  • Web Master
  • User avatar
  • Posts: 2700
  • Loc: Somewhere outside the box in Sarasota, FL.

Post 3+ Months Ago

ATNO,
Do you mean to have the two parked domain names point at the same content tree as the one that is working? (It IS working right? )

If that is the case, you should be able to add as many domain names in your zone file for that DNS server as you like, which will in turn (provided you tell godaddy that the authoritative DNS for those domains is your current domain name service provider.

Code: [ Select ]
 
zone "mydomain.com" in {
        type master;
        file "db.mydomain";
        //
        // Query list
        allow-query { localhost; "ALL-EXT"; "ALL-MSTR";  };
        //
        // Transfer list
        allow-transfer { localhost; "ALL-MSTR"; "ALL-EXT";  };
        //
        // Notify list
        notify explicit;
        also-notify {
               
        };
};
zone "mydomain2.com" in {
        type master;
        file "event/db.mydomain";
        //
        // Query list
        allow-query { localhost; "ALL-EXT"; "ALL-MSTR";  };
        //
        // Transfer list
        allow-transfer { localhost; "ALL-MSTR"; "ALL-EXT";  };
        //
        // Notify list
        notify explicit;
        also-notify {
           
        };
};
 
  1.  
  2. zone "mydomain.com" in {
  3.         type master;
  4.         file "db.mydomain";
  5.         //
  6.         // Query list
  7.         allow-query { localhost; "ALL-EXT"; "ALL-MSTR";  };
  8.         //
  9.         // Transfer list
  10.         allow-transfer { localhost; "ALL-MSTR"; "ALL-EXT";  };
  11.         //
  12.         // Notify list
  13.         notify explicit;
  14.         also-notify {
  15.                
  16.         };
  17. };
  18. zone "mydomain2.com" in {
  19.         type master;
  20.         file "event/db.mydomain";
  21.         //
  22.         // Query list
  23.         allow-query { localhost; "ALL-EXT"; "ALL-MSTR";  };
  24.         //
  25.         // Transfer list
  26.         allow-transfer { localhost; "ALL-MSTR"; "ALL-EXT";  };
  27.         //
  28.         // Notify list
  29.         notify explicit;
  30.         also-notify {
  31.            
  32.         };
  33. };
  34.  


You include that (zones.mydomain.com) with this in the named.conf;
include "/etc/named.d/zones.include";
and in that you have your included zones;
include "/etc/named.d/zones.mydomain.com";

The rationale for the multiple embeds is expandability.



Or some such... then you simply use the same db.mydomain for your domain name resolution.

Is that what you are looking for?
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

Well if I understood what you said, I might be able to tell you *lol.

You have to remember I'm a Windows guy.
OK, IIS lets you set up multiple websites. Upon installation of IIS you have a default website which is created in c:\Inetpub\wwwroot

However, using IIS Manager, you can set up as many other websites as you want.
I'm pretty certain I'll set it up using Host Headers as described here http://support.microsoft.com/kb/308163 and here http://www.iisanswers.com/Top10FAQ/t10-hostheaders.htm

I can pretty much follow all that and get it to work internally. Where I'm lost is that, this server already runs a website that has been online for close to 10 years. I can't change that. It is a static IP. The domain name for that website was purchased at Network Solutions, and I have the name servers pointed to the my ISP which resolves to my servers static IP address.

What I am having problems with is what name server to point the extra domains I have at Godaddy to? Obviously, I can't point them to my ISP's name servers because they won't know where to route it.

Do I just point them to my static IP?
Or do I create sort of a couple entries on my DNS server (which is the same as my webserver) such as ns1.mydomain.com and ns2.mydomain.com

And then for my two domains names at Godaddy, point them there?
I'm thinking just using the Static IP should work, but I don't know.

There has to be an easy way to do it, because how else do hosts have Windows server with shared domain accounts. It's the how to that I'm having problems with. Not finding much help from search results.
  • Daemonguy
  • Moderator
  • Web Master
  • User avatar
  • Posts: 2700
  • Loc: Somewhere outside the box in Sarasota, FL.

Post 3+ Months Ago

Well, I think we were saying the same thing. The technology you use to host the site is irrelevant in this case.

Was I right in that you want domain2 and domain3 to point at the same content that is already hosted at domain1?

If so, then all you need to do is add domain2 and domain3 to the zone file as I specified above and whomever maintains your DNS resolution. Obviously they will have to add those, and you will need to tell your domain name registrar the authoritative DNS servers for the two domains -- which should be the same as your primary domain.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

Well here is where I am at.

I have the "extra" domains set up on my server and I can access them internally using host headers per these instructions. I also used these instructions

mydomain.com is my default website. I've had that name registered with Network Solutions for nearly 10 years. I sorta figured out that I needed to add "A" records for ns1 and ns2 at netsol and point them to my static IP to resolve.

Then on my godaddy parked domains I pointed domain2.com and domain3.com to my ns1.mydomain.com and ns2.mydomain.com My actual server NS name in DNS in my DNS zone is myserver-01 but when I try to add that as a name server I get a message that it's not registered (and I did that entry at netsol too.)

Not working. Then I found out I needed to open port 53 inbound for TCP and UDP on my Cisco firewall to allow DNS inquiries. I'm not all that saavy with Cisco firewall command lines but I think I did it. I entered in the command prompt
access-list inbound permit tcp any host {my IP address here} eq 53
access-list inbound permit udp any host {my IP address here} eq 53

The resulting config is
access-list inbound permit tcp any host {my IP address here} eq domain
access-list inbound permit udp any host {my IP address here} eq domain

(I think "domain" is the equiv of port 53)

Still not working, and I'm stumped.
I can't believe it's this hard to find info to set up a windows server to host multiple domains.

*note. domain names are bogus but representative.
  • TOOL_5150
  • Born
  • Born
  • User avatar
  • Posts: 3

Post 3+ Months Ago

If you purchased the domains from godaddy, then simply log in and find URL Forwarding section for each domain and put in the full address in the 'destination' field.

My example I have set up:

I have 2 domains: 111.com and 222.com
111.com has an A record [pointed to an IP] which is my main web server.

On my server in the root web directory, I have a directory called 222, which is the website for 222.com

I configured URL forwarding for the domain 222.com to point to the destination: http://www.111.com/222

So, when you go to 111.com, youre goign directly to the web root, when you go to 222.com, you are goign to a sub directory. And all this can be set up in IIS under the 'default web site'

I believe this is what you are trying to achieve, and if godaddy does not have URL forwarding, pull your domains from godaddy to another registar such as http://www.mydomain.com - thats who I use, and I know it works. NO dns has to be messed with.

~Matt
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

Godaddy has URL forwarding. I can check into it, but then another problem comes up. How do you handle mail to your forwarded domains? Also how do you mask the domains so 222.com shows up that way and not as http://www.111.com/222 ?

I'd still like to do it as I planned. What's irritating is webhosts do it all the time, but it's really tough to get the right search terms to find the exact how to.

At the moment, I'm pretty certain I'm set up the way I should be, but not certain if I've got my firewall settings correct to allow the DNS queries to access my internal DNS server. Might have something to do with NAT translation which I'm not all that savvy on.
  • mindfullsilence
  • Professor
  • Professor
  • User avatar
  • Posts: 854

Post 3+ Months Ago

when you forward your URL, forward it to the subdirectory of the.

Use "stealth URL Forwarding" to mask the original domain it's pointed to. There are two types of forwarding, the first: "masked" or "stealth" forwading, and the second: "standard" URL forwarding. It should be in the options of your godaddy account.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

I saw the masking option when I looked earlier today. It still doesn't address the email issue though. Doing it the way I want to though would as I can set up MX records which I don't see the option to do at godaddy. And I need mail to be domain specific for these.
  • mindfullsilence
  • Professor
  • Professor
  • User avatar
  • Posts: 854

Post 3+ Months Ago

heh, again, over my head. I'll get TOOL back in here to see if he knows what's up. Hopefully he'll be able to answer tonight
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

Well primarily right now, I think I have everything I need set up correctly as far as name servers go. I think the problem now is getting the DNS queries through my Cisco Firewall to query my internal DNS server.

I really don't want to go with a forwarding option. I had a friend tell me the port I needed to open for DNS (I think it was port 53 TCP and UDP if I recall correctly) and I'm pretty positive I opened it correctly (I'm not a Cisco expert - my firewall was originally configured by an external company and I've been learning on the fly). I think the main issue now comes down to NAT translation which I'm not at all familiar with.
  • TOOL_5150
  • Born
  • Born
  • User avatar
  • Posts: 3

Post 3+ Months Ago

Email issue:

To Create an MX Record
Log in to your Account Manager.
In the My Products section, click Domain Manager.
Click the domain name for which you want to create an MX record.
In the Total DNS Control section, click Total DNS Control and MX Records.
Click Add New MX Record.
Complete the following:
Priority
The priority with which you want to assign the mail server.
Host Name
The domain name for the MX record. You can enter @ to map the record directly to your domain, or enter the subdomain of your host name (for example, www, ftp, and so on).
Enter Goes To Address
The mail server's address.
TTL
The time increment for which the server should cache the information.
Click OK.


~Matt
  • TOOL_5150
  • Born
  • Born
  • User avatar
  • Posts: 3

Post 3+ Months Ago

To Set the Nameservers for Your Domain
Log in to your Account Manager.
In the My Products section, select Domain Manager.
Use the checkbox(es) to select the domain name(s) you want to modify.
Click Nameservers.
Select: Parked/Forwarding Nameservers
Click OK.
If an offer displays and you want to accept it select the option and click Add to Cart; otherwise click No Thanks, Set Nameservers.


To Forward a Domain
Log in to your Account Manager.
In the My Products section, click Domain Manager.
Use the checkbox(es) to select the domain name(s) you want to modify.
Click Forward.
Select Enable forwarding.
In the Forward to field, enter the URL to which you want to forward your domain name(s).
In the Redirect type area, select:
301 Moved Permanently
Redirects to the site you specified in the Forward To field using a "301 Moved Permanently" HTTP response. The HTTP 301 response code tells user-agents (including search engines) that the location has permanently moved.

Go to the Masking tab.
Select Enable masking, and then enter the following:
Masked title
A short title that describes your Web site, up to 80 characters.
Masked description Meta tag
A short description about your Web site, up to 150 characters.
Masked keyword Meta tag
Keywords that describe your page, separated by commas or spaces, up to 500 characters. Search engines use keywords to identify the content on your Web site.
Click OK.

NOTE: Forwarded domains can take up to 24-48 hours to become active.




---------


This info was taken from godaddy help. I personally hate godaddy, but to each his own. I would not recommend you using YOUR dns servers for DNS lookups - let godaddy take care of that for you with URL forwarding.

As far as the email issue, add an MX record [basically an ip] that points to the email server that handles the emails for that specific domain name, and you should be good to go.

~Matt
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

Thanks for the help TOOL. Forwarding and masking are out. I did it for one of my sites and it worked just fine as I expected, but every page displays the home page link. I can't have it like that. I have to do it the way I had planned from the start, but looking around the manager there, I have a couple ideas.
  • dyfrin
  • Expert
  • Expert
  • User avatar
  • Posts: 503
  • Loc: WI

Post 3+ Months Ago

Ok ATNO/TW,

Correct me if I am wrong on the Scenario.

Scenario
Quote:
2 domain names that do not have an associated DNS Server (Godaddy only has the name, you need to point it to an authorized DNS Server that has the addresses and the IP's on it)
1 domain name that is on the ISP DNS server that points to your static IP.

1 IIS/DNS Server on LAN
1 Cisco Pix on LAN/WAN that has 1 external address assigned to it.



Resolution

DNS

First and formost, you cannot, cannot, have the lan domain be the same domain as one of the websites. Are you running Active Directory or are the machines in a Workgroup?

Second, the tricky aspect of local LAN clients using that DNS server.
If you go to http://www.domain1.com, your DNS will be set to return 216.external.number.44 to make external people get the right address, and your local client will never resolve the address because of NAT. It would need the local 172.16.1.20 address instead of the external for communication to the server on the LAN.

I propose not using this DNS for local at all, and making another DNS server for local.

So on your existing DNS server that will be used for EXTERNAL connections, open DNS and go New forward lookup zone.
domain1.com
domain2.com
domain3.com

In each, you put www. and BLANK A records to point to the external address of the PIX. *under assumption you have 1 ip address*

PIX

As of PIX 6.2 use static route. Insert actual values wherever you see my <example> without the < >.

Code: [ Select ]
static (inside, outside) tcp interface 53 <dnsserverip> 53 netmask 255.255.255.255 0 0
static (inside, outside) udp interface 53 <dnsserverip> 53 netmask 255.255.255.255 0 0
 
static (inside, outside) tcp interface 25 <mailserverip> 25 netmask 255.255.255.255 0 0
 
static (inside, outside) tcp interface 80 <webserverip> 80 netmask 255.255.255.255 0 0
static (inside, outside) tcp interface 443 <webserverip> 443 netmask 255.255.255.255 0 0
 
conduit permit tcp any eq 53 <dnsserverip>
conduit permit udp any eq 53 <dnsserverip>
 
conduit permit tcp any eq 25 <mailserverip>
 
conduit permit tcp any eq 80 <webserverip>
conduit permit tcp any eq 443 <webserverip>
 
  1. static (inside, outside) tcp interface 53 <dnsserverip> 53 netmask 255.255.255.255 0 0
  2. static (inside, outside) udp interface 53 <dnsserverip> 53 netmask 255.255.255.255 0 0
  3.  
  4. static (inside, outside) tcp interface 25 <mailserverip> 25 netmask 255.255.255.255 0 0
  5.  
  6. static (inside, outside) tcp interface 80 <webserverip> 80 netmask 255.255.255.255 0 0
  7. static (inside, outside) tcp interface 443 <webserverip> 443 netmask 255.255.255.255 0 0
  8.  
  9. conduit permit tcp any eq 53 <dnsserverip>
  10. conduit permit udp any eq 53 <dnsserverip>
  11.  
  12. conduit permit tcp any eq 25 <mailserverip>
  13.  
  14. conduit permit tcp any eq 80 <webserverip>
  15. conduit permit tcp any eq 443 <webserverip>
  16.  


For you, the dns mail and webserver ip are the same in the scenario.

Using ASDM then you create firewall rules to allow any to the two servers for those ports.

IIS
Now for IIS you need to create the 3 sites, all as 80/443, but different directories with different HOST HEADER VALUES.

You can test this internally easily, by using the INTERNAL DNS server you made, and having the 3 forward lookup zones point to the same webserver.

GoDaddy

Point all domains to use the DNS server of OUTSIDE PIX Address
  • dzumwalt
  • Newbie
  • Newbie
  • dzumwalt
  • Posts: 8

Post 3+ Months Ago

On the question of running multiple websites. All you have to do after you do your forwarding (to your IP) from the place you got the domain is create the sites in IIS but make sure they all use different ports. If all your domains are using the same port is wont work. Make sure they all have different port numbers and that should work for you. I ran into the same thing setting up my web server.

Thanks,
D
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

dzumwalt that actually sounds like what I need to do. Can you give me a few more details with perhaps some examples? I'm not very good with firewalls and opening ports, but think I've finally figured out enough Cisco commands to be functional. Obviously I'm a total noob at this aspect. I'm having a hard enough time following what everyone is suggesting.
  • dzumwalt
  • Newbie
  • Newbie
  • dzumwalt
  • Posts: 8

Post 3+ Months Ago

Do you have the domains set up on your server with different ports?
  • dzumwalt
  • Newbie
  • Newbie
  • dzumwalt
  • Posts: 8

Post 3+ Months Ago

you will just need to allow those ports in your ACLs
  • dzumwalt
  • Newbie
  • Newbie
  • dzumwalt
  • Posts: 8

Post 3+ Months Ago

Which should already be open because you are getting to the outside now right? As far as the commands, it has been 2 years since I have touched my firewall and I would have to do some more research.
  • dyfrin
  • Expert
  • Expert
  • User avatar
  • Posts: 503
  • Loc: WI

Post 3+ Months Ago

The problem with ports is the DNS server does nothing to determine ports. It is only for name <-> ip conversion.

The port forwarding either happens on a router or on the webserver.
Hostname headers makes it so you don't need to differentiate ports.

AFAIK the pix does not do port forwarding based on destination NAME only by destination IP. Because both are on one server, you cannot go that route.

If you go with ports, who will know to type domain2.com:8084 or domain3.com:8085.

And on my previous post, I forgot that instead of a 2nd dns server, just modify system32/drivers/etc/hosts to manually force those 3 domains to the local IP on any workstation on that LAN.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

No, I don't believe so. I have the multiple websites set up in IIS per these instructions.
http://www.no-ip.com/support/guides/web ... g_iis.html

My default domain (wwwroot) is my company website and I can't change that. Let's call it http://www.mydomain.com My external IP address is static and mydomain.com is registered through Netsol. My A and MX and cname records point to Netsol's DNS servers with my static IP addy.

My webserver is also my DC and DNS server. In DNS I set up A records for NS1 and NS2 to resolve ns1.mydomain.com and ns2.mydomain.com to my internal DNS server. (I also created the same A records at Netsol).

Per a fellow admin's suggestion I opened port 53 TCP and UDP on my firewall to allow DNS queries.

At Godaddy where my "extra" domains are registered, I pointed them to ns1.mydomain.com and ns2.mydomain.com.

They still don't resolve. I followed the domain forwarding instructions earlier in this post, and that works fine, but the domain masking sucks as it keeps the primary domain in the address bar for all pages, which just simply isn't going to work for me.

I sort of follow what you're saying about being on different ports, but don't know how to do it.


Basically, I want my extra domains at godaddy e.g. mydomain2.com, mydomain3.com etc, to point to my static IP and resolve to the respective website in IIS. And that's where I'm stuck. Can't get them to resolve.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

dyfrin wrote:
If you go with ports, who will know to type domain2.com:8084 or domain3.com:8085.


Yes. That is exactly what I don't want.
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

Post Information

  • Total Posts in this topic: 36 posts
  • Users browsing this forum: No registered users and 19 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.