skip to Main Content

I have setup my react project on GCP VM instance and try to access it on port 80

Here is my Nginx setting

server {
    server_name 12.13.14.15;
    location /{
    proxy_pass http://localhost:3000;
    ...
    }
}

But if I go to http://12.13.14.15 on the browser, it is off
So I checked the 80 port with a port checker and it is closed even though it is on the traffic rule of the GCP instance.

enter image description here

How to solve this?
Thanks.

2

Answers


  1. In GCP VM instance enable the HTTP traffic and HTTPS traffic in the firewall settings section you can find in the below image for your reference

    Login or Signup to reply.
  2. If you are using Container-Optimized OS then the default firewall configuration might be different.

    By default, the Container-Optimized OS host firewall allows only
    outgoing connections, and accepts incoming connections only through
    the SSH service. To accept incoming connections on a
    Container-Optimized OS instance, you must open the ports your services
    are listening on.

    Configure the firewall rules by following this official doc for Container-Optimized OS and also verify VPC Firewalls rules. If you are still facing issues then perform these troubleshooting steps for the connectivity test.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search