multiple domains on windows azure virtual machine - asp.net

I have created windows azure virtual machine and opened port 80 default website that is myapp.cloudapp.net then I have pointed my custom domain www.mycustomdomain.com to myapp.cloudapp.net it is working fine. I have created another website in iis with port 81 I have checked it is working on vm but I would like to add another custom domain to the website on 81 , I don't understand how to do that because ip and dns is same , how to give custom domain to 2nd website?

Domains should be set up in IIS. You will need to define host headers for each website hosted on the server. This also means you don't have to define non-standard ports.
Configuring host headers

Related

Make local web app accessable by http://LocalComputer/WebsiteName on IIS

I am trying to make web app accessible by http://LocalComputer/WebsiteName on IIS.
I am able to access it by http://computername:portnumber/
So what does my binding need to be and do I need a static ip?
Any help or redirection to appropriate resources will be greatly appreciated!
Is IIS setup on default port 80? If your document root is setup to website, you should be able to access it via http://computername/. If this is a local setup, and assuming your DNS is setup and working on the router, wont need a static IP although doubtful IP will ever change.
http://LocalComputer/WebsiteName this can be done locally without a static IP.
In order to make it publically over http you would need below things.
1) Registered domain name
2) Registered name servers
3) DNS zone created for the domain either with registrar or on the server
You can either host this website by renting a Windows VPS or a server and with the help of third party control panels like Plesk or Hosting controller.
OR
You can purchase a shared web hosting space from a windows hosting provider and upload your pages to make the contents accessible publically.
Another option would be to set multiple domains in your hosts file
domain1 192.168.0.10
domain2 192.168.0.10
...
Set IIS to bind and hosts multiple domain on the same IP. Then you can access each site locally by going to http://domain1 or http://domain2 etc...

why can't web site not accessible using port 83?

I have hosted site to windows server 2012 r2.
I have bind site by port 81,83,2163.
It is accessible using all other port except port 83 using domain name as well as
with IP, but when I'm accessing using port 83 with domain name it is not accessible, but it is
accessible using IP with port 83.
I have disable firewall still not working, why?
Edited
From the Bindings list, select the Port 83 binding, and click "Edit." From the dialog, specify the fully-qualified domain name for the site in question as the "host name." This allows IIS to respond to the request for the website via the desired domain name reference.

How to access my sites on IIS 7.5 from outside my network on Windows Server 2008

I'm new to Windows Server 2008 and IIS, so please be patient.
I want to access my sites from outside my network.
I can browse my sites from the localhost, it's working.
I've added a binding to my site, Type: http, Host Name: www.dev.com, port: 80.
I have a static IP from my ISP, and my router is forwarding http requests to my server.
If I remove the Host Name and access directly using my network IP address, I get my site, but I want to provide a host name to the site because I'm going to add another web sites.
I've added www.dev.com to the DNS with my IP address.
What should I do next?
Thanks
I found the answer to what I was looking for, I should've done this:
create virtual application www.dev.com under default website on IIS,now I can access the website using STATIC_IP_ADDRESS/www.dev.com .

How to access multiple website using different bindings on IIS 7.5

How can I access different websites hosted on my local IIS 7.5 (using different bindings) from my ipv4 address?
My system32\drivers\etc\host file has my binding names mapped to 127.0.0.1
In IIS, I have the normal "Default Web Site". Its binding hostname is empty, set to all unassigned ip address and port 80. On my network, I can access this site using the server ipv4 address like so : http://192.168.2.1/mySubSite/index.html where mySubSite is a child folder of the "Default Web Site". I can also access it locally using http://localhost/mySubSite/index.html
If I setup a second website in IIS using the same binding as the "Default Web Site" but using a hostname (say "site2"), I can access it locally using http://site2/mySubSite/index.html.
How can I access this second site on my network the same way I access the "Default Web Site" using the ip address? Is it possible?
the easiest way to do this is to change the port binding on each website. This takes minimal configuration and you can place a website on any port you want (I recommend ports over 1024...to a maximum of 65000)
For example, your default site will automatically be on port 80. Place site 2 on Port 2000. Then you can access your default site like you have above, and you can access site 2 with a similar url like http://192.168.2.1:2000/mySubSite/index.html. Notice the port is specified in the url using the :[port] at the end.
Yes, you can have multiple sites on the same IP address and port. It is called binding by domain name.
Open ISS and go to your first default site (one that is functional) and then go to edit bindings. You will see by default it states "http: Port 80 IP Address *"
Notice the hostname is blank? This is where you can tie a domain name to that exact port. Fill out domain name on both your site bindings. This means when someone comes in from that exact domain name, it knows where to forward traffic too. If port 80 inbound doesn't match either of those two domain names, it will default to w/e site has no bindings such as the "default site".

Getting site running in IIS 7 Issues

This is driving me nuts. I am trying to setup a webiste on our dev server with a specific url name www.mystpidsite.com as an example. mystupidsite is not the same name as the dev server.
1) specify a specific url to use for the website I create in IIS
2) run it and use that url to access it
I have:
1) created a new site in IIS 7 in Server 2008
2) attempted to access it via the site name which I set to the desired url and port 8888. So if we want it to be www.mystupidsite.com I setup the website name to mystupidsite in IIS 7.
3) I even tried to create an application under mystupidsite with the same name in IIS 7.
The server is definitely accessible and pingable on the network from my local PC, we have other stuff installed on this new server. Do I need to create an application or is just creating the website enough in IIS 7? I specified the IP as the server's IP in the website I made.
For the host name in the bindings of the site I put www.mystupidsite.com
when I try to access the site via www.mystupidsite.com it can't find it and the site in IIS7 on the dev server is running. It's running on a HyperV instance which is our dev server. Everything else has worked just fine. I just wnat to understand how to get a specific url by name setup.
Do I need to add something in the hosts file on the server or something?
You're not going to be able to have a site on your dev box answer to both the mystpidsite.com and mystupidsite.com domain names.
Unless you have the domains registered and have your domain's nameserver directing that name to your dev machine, IIS is only going to answer to requests either the machine name on the network or the IP address of your machine (in addition to 127.0.0.1 and localhost).
The only thing you're going to be able to do outside that scenario is set up two sites on two different ports on your machine and access them from http://localhost:80 and http://localhost:8888 (or network computer name equivalent).
you need to have an entry in dns to be able to hit the server when using www.mystupidsite.com
Because you have the site running on an alternate port you should be able to get to it by http://your-server-IP-address:8888
If you want to test it locally using the host name and do not have access to dns you can add the appropriate entries to the hosts file on your local machine (c:\windows\system 32\drivers\etc\hosts)
What happens when you type 'nslookup www.mystupidsite.com'? Do you get the IP address of the virtual server?
Do you have the windows firewall enabled on the server? if so, did you add an exception for port 8888?
add a default binding (no host header / blank) and try accessing it by IP

Resources