• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 645
  • Last Modified:

multiple websites on same IIS- domain problem

Hi,

How to host multiple websites/domains on same IIS? I created 2 websites on same IP address with different ports(like http://22.34.45.66:5060/  and other one http://22.34.45.66:5050/ ). Now, I want these 2 to point to my domain but I cannot? I have websitePanel installed but I cannot point domain to website?

Any advise?
0
sindhuxyz
Asked:
sindhuxyz
  • 4
  • 3
  • 3
  • +2
3 Solutions
 
jax79sgCommented:
Are you referring the 'domain' to a Windows 2003 Active Directory Domain?
If yes, all you need to do is to join your IIS server to the domain. The default settings should allow it to register with the DNS server in your domain. Now you should be able to access the web sites via
http://mydomain:5060 and http://mydomain:5050.
0
 
sindhuxyzAuthor Commented:
Is it not possible to hide port in domain name url?
0
 
jax79sgCommented:
Yes you can.
You need to do 2 things,
1) Configure your DNS to redirect 2 different hostnames to your IIS IP address.
E.g Point alpha.com to 22.34.45.66, and point beta.com to 22.34.45.66
2) Add a domain name in the host header property in each of your website in IIS.
E.g. For website A,
IP: All Unassigned
TCP Port: 5050
Host header: alpha.com

E.g. For website B,
IP: All Unassigned
TCP Port: 5060
Host header: beta.com

If i am not wrong you should now be able to access
http://alpha.com/ and http://beta.com/ as http://22.34.45.66:5060/  and http://22.34.45.66:5050/ respectively
0
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

 
Sigurdur HaraldssonSystem AdministratorCommented:
As jax79sg said. Personally, I think you forgot to set the host headers for the domains in the IIS so the web server doesn't know how to handle the requests for the domain names.
0
 
SteveCommented:
different port numbers are usually used to separate multiple websites on the same domain but if the websites are on different domains you should be using hostheaders.

http://support.microsoft.com/kb/324287
0
 
sindhuxyzAuthor Commented:
Before, I missed host address, now I added it. I have 2 IP addresses on VPS. I am using secondary now not primary IP address.

Now ,

both http://alpha.com/ and http://beta.com/ showing me "Default Website" of IIS

I have configuration like below:

Website > Description: Alpha.com
      > IP address: 22.34.45.66
      >TCP Port: 5060

Multiple identities for this web site > 

IP address   TCp Port  Host Header value
22.34.45.66   5060      alpha.com
22.34.45.66   5060      www.alpha.com


Any advise?
0
 
brwwigginsIT ManagerCommented:
In my opinion, if you are using host headers you don't need the ports. It's pointless.

Besides, if you point your browser to http://alpha.com it automatically assumes port 80 for the HTTP protocol. You would have to structure your URL to be http://alpha.com:5060 for it to work with your current setup.

I would leave the host headers configured but change the port back to 80 on each site and it should work.
0
 
SteveCommented:
agreed. port 5060 is usually used for SIP so this will confuse many.
Unless you specifically want to use ports, id set it all back to defaults of 80/443.
0
 
sindhuxyzAuthor Commented:
I managed to run one domain with website but domain has issue with "www", lets say

http://alpha.com ---- works and show content

while

 http://www.alpha.com  ---- do not show content?

I added domain name "alpha.com" in DNS setting of domain A Record.

Any advise?
0
 
Sigurdur HaraldssonSystem AdministratorCommented:
Is www.alpha.com also registered in DNS?
Did you add a host header for www.alpha.com?
0
 
sindhuxyzAuthor Commented:
Host header has both alpha.com and www.alpha.com

Should I add 'A Record' for both alpha.com and www.alpha.com?

0
 
Sigurdur HaraldssonSystem AdministratorCommented:
You can use either A record or a CNAME for www.alpha.com since you already have an A record for alpha.com
0
 
SteveCommented:
yes, every address you want to work externally must have a dns record.
If no record exists for www.alpha.com it wont work.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

  • 4
  • 3
  • 3
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now