How Do You Troubleshoot a Web Server in GCP Not Working via a Web Browser when Port 80 Is Not Blocked?

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

  1. Log into GCP.
  2. Click on the VM instances.
  3. Click on the server's name as it should be hyperlinked.
  4. Click "Edit".
  5. Go to the Firewalls section. Click the boxes for "Allow HTTP traffic" and "Allow HTTPS traffic".
  6. Scroll to the bottom. Click "Save".

Leave a comment

Your email address will not be published. Required fields are marked *