DNS and Http HOST header issue - http

I am using SharePoint Server 2007 Enterprise with Windows Server 2008 Enterprise. And I am using publishing portal template. I have a physical server with a single IP address, and I have set in DNS to map two domain names (server1.mycorp.com and server2.mycorp.com) to the same server/IP address.
My question is how to setup two SharePoint web sites on the same server with a single IP address to serve two domain names individually (with the same port number 80)? My current idea is to create two SharePoint web applications for the two web sites, with the same port number 80, but with different host header (setup Http host header to server1.mycorp.com and server2.mycorp.com individually for the two SharePoint web applications). Not sure whether my idea is feasible?
thanks in advance,
George

I believe this belongs in ServerFault.
And you also seem to describe a common host header concept, when you create your WebApplication in the SharePoint Central Admin, you will define a host header, being on the same IP or not, IIS will respond to them individually, so yes it works.
Application Management => Create Web Application => define host header, define same port 80, done.

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.

Running multiple ASP.NET websites on same port and IP

I want run multiple ASP.NET websites on a single IIS server using the same IP address and port (80).
I cannot use host headers to accomplish this because my clients have not agreed to use a domain name.
My websites will be accessed using an IP like 227.23.32.44. All of them will use the same port (80). The reason for this is, I have around seven applications and my clients wants me to use standard, IANA approved, easy to remember port numbers.
If I want to go with standard, IANA approved TCP port numbers, I would be left with
227.23.32.44:80
227.23.32.44:116
227.23.32.44:84
This is not very user friendly.
Rather, if I use
227.23.32.44:80
227.23.32.44:81
227.23.32.44:82
Then it is much more user friendly but my clients will not let me use this.
Is there any other way to run multiple websites? Can I use another proxy server to inspect the url of all incoming requests and then route to the necessary application? I have heard about nginx. Can I use nginx to do this?
You need to uniquely identify a site using a composite key of IP+Host Header+Port.
Since host header is out, you are left with just IP and Port. You have 2 options.
1.Have multiple adapters so that you have multiple IPs and port will be 80.
2.Have same IP but different Ports
Host header is meant precisely for this reason. You can have same IP, same port but different Host header.
Nginx is not a silver bullet either. You won't be able to run ASP.NET on Nginx.
Why not to put applications in different folders on IIS?
227.23.32.44/WebApp1
227.23.32.44/WebApp2
227.23.32.44/WebApi
IIS support this out of the box:
Go to IIS Manager
Right-click Default Web Site
Choose "Add Application..." command. Alias means customer visible part of URL.

IIS host Multiple applications

I am trying to setup multiple applications within IIS, single server. I want all to use port 80 and the server has only one IP address.
I have created two application (site1 and site2) within IIS and modified the 'Host name' under bindings on each as follows:
site1.mywebsite.com
site2.mywebsite.com
and kept the IP address and port values to be 'All unassigned' and '80' respectively.
I have "mywebsite.com" through godaddy, and not sure how should I configure dns zone file to take this into effect. Please help....
(My ultimate objective is to have n+1 sites hosted in the same server, so that site1.mysite.com through siten.mysite.com points to their respective application, and every other subdomain points to n+1 th application.
Is this a possibility?)
Thanks in advance,
Anuruddha
Both site1.mywebsite.com and site2.mywebsite.com must point to the same IP - one assigned to your server by GoDaddy. So as long as users access the sites by host names you're fine.

Merge three applications into one in asp.net mvc 3.0

I have three MVC3 web project into a single solution, like admin, UI and service(WCF service).
Now i need to merge it into a single project as i have to host it on a single IP on Network solution. Please suggest how we can combine all these project.
You can host the three applications on a server and bind them with the same IP but different port number. In the application bindings give different port numbers to the applications. Like default (80) for UI and port 8080 for web-services and port 8090 for admin application.
Another option is to use the same IP and ports but ask your admin to configure 3 host name in DNS that map to the same IP. Then in bindings specific each distinct hostname for each of the web applications.
If the above solutions are not acceptable in your case then you need to make some changes to the application and organize it using MVC areas. Then you will have one application and 3 areas however you need to take care of session management, security,etc if they differ in the 3 apps. Here is info: http://msdn.microsoft.com/en-us/library/ee671793(v=vs.100).aspx
Another one: http://www.codeguru.com/csharp/.net/net_asp/mvc/article.php/c20227/Using-Areas-in-ASPNET-MVC-Application.htm

Asp.net Intranet Application in local Networks with out IP

I developed an asp.net (2.0) intranet Application for local network in an organisation..
so we have 10 systems every one should access that site by ://192.xxx.x.xx/xyz(website name) ...
so now their requirement is not to type total ip adress.they need just by typing ://xyz they have to browse the intranet application..how to solve this issue..?
Thanks
Veduru
Go to every one of this 10 computers, and in this directory
c:\WINDOWS\system32\drivers\etc\
find the host file and add the conversion of ip to name as
192.168.1.10 xyz
etc
and then you can access the site as http://xyz
Talk to your network admin about setting up a DNS entry for your application in the local DNS server. If you have multiple web sites running on your web server, look into configuring IIS host headers to ensure the users get directed to the proper web application.
Please do not manually edit the hosts file on each machine unless it is absolutely, positively necessary, and only do so as a last resort. When your 10-machine application expands to 100, or if your server IP ever changes, you will thank me later :)

Resources