0
votes

On Azure (through portal)

Created Virtual Machine with a Static IP, data disk, and opened ports Then remote desktop - Install IIS and FTP, ports opened in firewall (can successfully connect via ftp client)

Created a Public Load Balancer with a Static IP with Probes and Rules (can connect with ftp client through load balancer ip address fine) (if I enter ip address of load balancer in browser I can view the default iis website fine) (at moment there is only one vm in virtual machine set)

Added a couple of websites in IIS, one a .net app, and the other with just some hello world .html files to test connectivity via domain name. I set bindings to host name for websites with and without www. and IP address set to all (*). restarted websites.

Created a couple of Azure DNZ Zones with A Records pointing to the Load Balancer IP address. Changed name servers on domain register to point to the azure dns servers.

However, this is where it stops. A browser cannot get to either website and I get a '500' error. dns propogation check tools verify that the nameservers are reaching azure for domain names.

There must be something really basic I am missing (???) It is as if DNS resolution is stopping at the virtual machines. Any suggestions.

2
A 500 means there was an error on the server. I would think the request is reaching the server. Does the app work if you access it on localhost on the VM?juunas
Got it sorted out and all working now. The 500 error was from a low usage website that I swapped over, and the error was from inconsistent nameserver propagation and some configuration issues on new VM. The proper error was a 'not resolved'. That was from an error on my part on zone, getting my feet wet on azure (amazing how some sleep can fix things). Thanks for your reply.Michael Khalsa

2 Answers

0
votes

If you are Configuring multiple websites in a IIS of VM and also you want to map them for different domain name, then you need to Configure Host Header for all websites in IIS (Please find below links for this) and also need to update same A Record for all your websites at you Domain provider setting.

This will work if you have separate Domain Names registered else it will not work.

Without domain name you can deploy websites on different ports in IIS and then configure custom domain in Azure Load Balancer NAT rules.

Links for Host Header config in IIS

https://technet.microsoft.com/en-us/library/cc753195(v=ws.10).aspx

http://support.simpledns.com/kb/a82/virtual-hosting-with-iis-internet-information-services.aspx

0
votes

This was my fault in some missing hyphens in the zone record. The other .net website was throwing 500 errors sometimes instead of error-name-not_resolved from incomplete nameserver propogation and incomplete .net configuration for the website on VM

The host headers were set correctly including www.xxx.com and .xxx.com variants for both port 80 and port 443, and I did have the 'A' records with both @ and www variants in the zone set to the IP of the load balancer correctly.

For anyone else with these issues, when checking for localhost connectivity test on your virtual machine (assuming you are hosting multiple sites), remember to add a virtual directory in IIS manager pointing to the file location along with an alias.

While a learning curve, the whole infrastructure of Azure is quite amazing! Impressed.