Problem scenario
From a web browser these commands succeed (where x.x.x.x is the external IP address of the Linux VM serving the web service):
Test-NetConnection -ComputerName x.x.x.x -Port 80
Test-NetConnection -ComputerName x.x.x.x -Port 443
But when you open a web browser and go to the x.x.x.x IP address, but the page does not load. You may get an error message about it timing out or not being reached or available. How do you fix this?
Solution
- Log into GCP.
- Click on the VM instances.
- Click on the server's name as it should be hyperlinked.
- Click "Edit".
- Go to the Firewalls section. Click the boxes for "Allow HTTP traffic" and "Allow HTTPS traffic".
- Scroll to the bottom. Click "Save".