Welcome to the Microsoft Q&A Platform. Thank you for reaching out & I hope you are doing well.
I am afraid I did not quite understand your question here.
Please note that localhost means 127.0.0.1 and which in turn means your local machine.
In case you would like to access your Azure VM server from a client browser,
- You should associate a Public IP to the VM
- and then allow network traffic to the VM via NSG.
#1 Associate a Public IP to a VM :
#2 Allow access via NSG :
- Create a NSG : here
- Associate this NSG to the NIC/Subnet of the VM : here
- Create an allow Rule : here
- Make sure you configure
Source is Any,
Destination is Any
Protocol is Any
and Destination Port as 8888
- Make sure you configure
Points to Note:
- Since the port 8888 is not a common port for HTTP or HTTPS, you must explicitly specify the port from the browser while accessing the site.
- i.e., it should be "https://<publicIpOfTheVM>:8888"
Hope this helps.
Cheers,
Kapil