Configure Shared Website Hosting for IIS - iis-7

I have a server that running IIS7 and DNS server.
I have 2 domains:
www.mydomain1.com
www.mydomain2.com
I want to visitors from internet coming without port of this sites. What may i do for this?

If I understand your question correctly, you need to set up two separate websites within IIS, and configure the bindings on each site - select the Bindings option and specify the correct hostname, for each site.
Note - this will only work for HTTP sites; if you want to route HTTPS to each site, they'll each need a unique IP address as you cannot setup hostname bindings for secure sites.

Related

How necessary is DNS Server to run an ASP.NET web app on IIS?

Assuming a Windows Server 2012 VPS:
It seems that many tutorials include the setting up of DNS Server (setup of forward lookup zones, and A record) as part of the basic steps to deploy and run an ASP.NET web application on IIS.
I'm slightly confused, because within IIS manager you can set the bindings ( IP address, URL, SSL, port) of a web application. Wouldn't this alone not suffice to correctly route incoming requests to the correct web application?
What would be the advantage to running DNS Server?
IIS Manager can only manage IIS related Windows settings, but to make a site work you need much more settings than that.
DNS settings are critical to direct web browsers to your side. Nobody uses IP addresses to access a site, so a typical URL uses domain name. That requires DNS to translate the domain name to an IP address so that browsers can send HTTP packets to the proper location.
IIS Manager could not manage that for you, as which DNS product to use or how to configure it is usually vendor specific and out of IIS's scope.

Different output for http and www versions

I have a domain ie: foo.com
when i type http://foo.com , it goes to my app.
When i type www.foo.com it goes to default IIS page.
I am using plesk 9 for windows.
When i use nslookup to look up DNS they both point to same DNS.
In the IIS application go to bindings, and make sure BOTH www.yourdomain.tld as well as yourdomain.tld are binded. (PS. This question might have been better off at serverfault.com)
If the two domains points to the same IP address, it seems you need to properly configure the Host Headers of your IIS server.
Using Plesk, i think you just have to add a proper alias in the domain management page.
Changes which made in domain's configuration directly in IIS(not via Plesk) will be reset in future(after domain configuration update in Plesk)
In Plesk 9 you can switch on 'www' for domain on Hosting settings page, there is check box "WWW prefix" from left of domain name.

Hosting Multiple Sites through LAN in ASP.NET IIS 7

We have a few services running on our internal server, named cpweb2.
The Default Web Site is accessed locally by browsing to http://cpweb2/.
To enable browsing to other applications, the other sites are assigned a different port number.
For example:
CapacityTracker is configured to use port 8081: http://cpweb2:8081/
AcpWcfTool is configured to use port 8093: http://cpweb2:8093/
ProductionScoreboard is configured to use port 8082: http://cpweb2:8082/
ShopServices is configured to use port 8095: http://cpweb2:8095/
As you can imagine, not many people simply remember the web address for these sites.
I am currently creating a new service called AcpMainframe. I would like to give it a more user friendly URL like http://cpweb2/mainframe or http://mainframe.cpweb2/, but I don't know how exactly to do that if Default Web Site is not one of my projects.
I guess this question is two parts.
Can I get my new AcpMainframe service added to the root level Default Web Site if I do not have the code for that root level website?
If so, how do I go about that?
If you can use other hostnames in addition to the one you have, you can set bindings in IIS that will allow multiple sites to run on port 80. Examples can be found here.

DNS and Subdomain IIS

I have 2 web apps installed on my IIS, one running as app1.mydomain and other one as app2.mydomain
In the test environment I just copied about two entries pointed to 127.0.0.1
What changes do I have to do in order to put this on production server, I mean on DNS level?
Can I use URL re-write on IIS to avoid changes for DNS?
Thanks
You need to add A or CNAME records mapping both subdomains to the external IP address of your server.
This tells web browsers to go to your server when you go to the subdomain; URL rewriting has nothing to do with this.

How can we configure IIS for domain name mapping

I would like to configure IIS server at (Windows server 2003) for domain name mapping.
We have purchased domain name for one of our newly created website.
I would like to know how can I configure IIS so that anybody from outside world can reach website by typing URL.
As in: http://example.com/ should redirect to my the home page of my website.
I have made website in using ASP.NET and Oracle.
How can I do this?
You need to register your domain on a DNS server, which is different (though could be the same physical box) as your IIS server. Long time since I've done this myself, as I use a hosting company for this kind of thing, but you will typically need at least two DNS Server IP addresses typically for a domain (primary and secondary DNS servers). There is a DNS Server for the windows server platform, but most people use hosting services to do this thing.
By the way, you might get a better response posting this kind of question on serverfault.com, as it's not really a developer question.

Resources