Internet access to the website built with azure Virtual Machine
1,Build an Ubuntu + Apache + PHP Environment(The steps for mysql are omitted here)
Building the above development environment on azure is the same as building a local PC. For more information, seeHere.
2. access from the Internet
Note that the premise for this step is that in the first part, you can already access your website in the Virtual Machine. If the Virtual Machine on azure does not have a graphic interface, you can refer to here, use a CLI browser to browse your helloworld. php to verify that the environment is successfully built.
The following describes what to set for accessing from the Internet:
2.1 select the virtual machine where the website is located and select the endpoint panel. If there is no port 80, add an endpoint of port 80 (set to TCP type, and the name is random) note that the port number here must be consistent with the port number configured by apache in the virtual machine. The apache2 of my ubuntu is configured in/etc/apache2/ports. conf defines 80, so enter port 80 here.
The HTML folder contains index.html and helloworld. php, so I can access "DNS name" or "DNS name/helloworld. php" from the Internet in a browser ")
3. Good luck!