Azure VM Webhosting - IIS public access - azure

I am hosting a website on my Azure classic VM, 2012 Server R2. The application is MVC5 installed in wwwroot directory, runs on local host. The site binding type is Http, Port 80, and IP address is all unassigned.
To setup the public access I did the following:
Added endpoint TCP 80 private and public (Azure Portal)
Added inbound rule (firewall) Http port 80, the World Wide Web Services (HTTPS Traffic-In) was already open.
When I try to access the site http://xxxx.cloudapp.net, I get this error: can't reach this page!
Have I missed any step?

Could it be that the site name is configured wrongly in IIS? Is it the default website?

I had to delete the VM and install a new one; however this time I did setup the endpoints before installing the VM, all works now.

Related

Access xamp localhost hosted on Azure Vm public

I am having an issue and not able to resolve it.
I have XAMPP instaled on Azure Virtual Machine. I created a virtual host, instead of the localhost/application I am running an app as application.local in the browser. It works fine and it opens a web app.
Now, I am trying to access it over Azure VM public IP address and it doesn't work, any suggestion on what I can do to make it work?
I tried disabling the firewall and it has no luck.
It seems your application works fine inside the VM, but you can't access the application through the VM public IP address outside. Then you need to check if there is an NSG rule that allows the traffic to the port listening by the application. If no, you need to create one rule for the port.

Deploy website on azure virtual machine and access on internet

I want to deploy a website on azure IIS by using server 2016(Azure VM), and want to access it anywhere on the internet. How can I do this?
Which ip address I've to use for this purpose?
There are several steps to acheive this deployment on IIS.
1.Install IIS on azure VM.
https://devblogs.microsoft.com/premier-developer/set-up-iis-on-windows-virtual-machine/
2.Create a website for publish
Please remember to grant permission for authenticated user like IUSR and application pool identity
https://support.microsoft.com/en-gb/help/323972/how-to-set-up-your-first-iis-web-site
3.Set Azure VM firewall to allow your port like 80
https://learn.microsoft.com/en-us/azure/virtual-machines/windows/nsg-quickstart-portal
4.Publish your website.
You could achieve this via simple copy action in Remote desktop or VS web deployment
Just ensure your website can be accessed via telnet or tcping.exe. I remember ping is blocked by Azure VM.
https://learn.microsoft.com/en-us/azure/virtual-machines/windows/publish-web-app-from-visual-studio
5.Try to access from both internal IP address and external firewall IP address.
If you could access from internal IP which means your IIS site has been built correctly.
If the website can be access from external. Then you have finished the publish.
6.If you want to access website from public domain.
Then you have to purchase domain name from public domain provider. Then bind your domain to your public IP address on their portal. As long as the website can be accessed from external. It would work with domain name.

Azure VM IIS unreachable from public IP / cloudapp.net domain

I just setup a Windows Server VM on my Azure space, but for some reason the IIS that is configured on it isn't available publicly...
I can open the IIS welcome page trough localhost on the server, but no trough visiting the external IP or the cloudapp.net domain.
Something to note is that I actually CAN reach the server trough MSTSC with the external IP adress...
I tried:
Shutting off the Windows Firewall
Opened endpoints on the non-classic management Azure system
I binded the ip's to the cloudapp host
Checked the online Azure documentation
So I resolved it... Don't know if it's supposed to be that way, but be sure that in Azure your "Source port" is defined to be * and not 80, or other.
That will absolutely not work if you're not defining "*".
Screenshot of Azure here

How can my site become public to the internet when i have done this actions:

Created virtual machine in Azure.
Added HTTP endpoint on public port 80, private port 80
Installing from Terminal into Azure Virtual Machine: Ubuntu 14.0.4, Apache, phpMyAdmin and my Joomla Site.
I can acces my site with IpAdress/myJoomlaSite but i want to show my site to internet like www.myJoomlasite.com.
What should I do?
You only have to (in a nutshell):
Create the domain and a CNAME for the URI we provide to you at the portal (websitename.azurewebsites.net)
Add the domain to the portal so Azure App Service knows what to do with it.
More information and detailed steps you can find on Configure a custom domain name in Azure App Service

Can't get Azure Virtual Machine to serve websites

I've just set up a windows azure VM and installed IIS on it.
When I remote desktop onto the box I can see the default IIS website fine but I can't get this to serve on the web from the IP address of the box.
I've opened up port 80 on windows firewall and also added an endpoint for port 80.
I've tried to access it with the firewall completely turned off also but to no avail...
I cant work out if there is anything else I need to do to get this working?
Add endpoints for port 80 (http) and port 443 (https) to the VM in the Azure portal (tip: this can be automated with powershell or the Azure cli).
Remote desktop to the machine. Open the Windows firewall control panel and allow traffic to port 80 (http) and port 443 (https) or just turn it off ... the firewall is ON by default (tip: can also be scripted through the VM agent / powershell).
Go to the Azure portal and find the cloudapp.net subdomain for your VM (actually the cloud service) your VM is running under. Try accessing the site with that domain. If that doesn't work, try browsing to http://localhost on the server (remote desktop) to make sure IIS works and troubleshoot from there.
Modify the DNS records of your custom domain to use a CNAME to the .cloudapp.net domain. If you need A records make sure to use the public IP of the cloud service (just ping the .cloudapp.net domain to find it or look in the Azure portal).
You might want to look into Azure Websites or Azure Cloud Services (web roles). Those are a lot easier to manage and a lot cheaper. They still offer most of the functionality.
What fixed the issue for me was to go into the Azure Portal, browse to 'Network Security Groups', select the VM and then create an inbound rule to allow traffic to port 80.
Note: Also ensure that the inbound rule to port 80 is added and enabled on the actual VM.
Well, I deleted the existing VM and Cloud service and started again - all worked fine out of the box this time.
How annoying! The only thing I did notice was that before my cloud service had the same name as my VM - this time they had different names so that might have been what was causing the issue.
Cheers
For the newer VMs and pre-configured setups (2015+), it's possible your setup is using an azure asset called "Public IP". If so, you can set a custom DNS name label in it, inside "Configuration". Note that this name will consider any type of region used when creating the VM (e.g. my-site.brazilsouth.cloudapp.azure.com).
It's good to remember that for testing purposes, it still suffices to use the value of the public IP that is randomly designated to you.
The VMs are actually accessed via a Cloud Service (well they are for me). Azure created a Cloud Service automatically to be the scaling engine/load balancer on the front of the VM. I have to connect to the web site via that cloud service, not the VM directly.
Its possible you were using the internal IP rather than the external IP.
The sites have to use the internal IP address in the bindings section of IIS. However, in your dns you will need to use the external IP. This is presumably since the 'internal IP' is just a virtual one that Azure uses to map traffic from the external network to the VM's inside azure.
You should find both the internal and external IP's are visible on the VM's desktop.
Switch off TLS 1.3 in the Registry Editor.
This is what worked for me as of writing this in Mar 2021.

Resources