Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Enable Access Google Compute Engine Instance Via HTTP Port

I have created a Google Compute Engine instance and installed a web server and my app. Now I am having trouble finding information on setting up an external address so that I can access the instance from outside Compute Engine.

How can I setup an external address for my instance so that it is accessible through clients, such as web browsers?

like image 307
Branka Avatar asked Mar 17 '14 12:03

Branka


People also ask

How do I enable HTTP in GCP instance?

Below are the steps for configuring firewall for allowing HTTP traffic on VM. Login to Google Cloud Console and navigate to "VPC network" in "NETWORKING" section. Provide Firewall rule details as listed below. Select tcp and use port 80.

How do I access Google Compute Engine?

Connect through a browser from the GCP MarketplaceBrowse to the Google Cloud Platform console and sign in if required using your Google account. Find and select your project in the project list. Select the “Compute -> Compute Engine” menu item. Locate your server instance and select the SSH button.


1 Answers

Because you've created and setup your machine, so the only way to give it a static ip address is:

  1. Go to Cloud Console
  2. "Compute Engine" -> "Networks"
  3. New Static IP
  4. Attach it to your GCE instance

and one more thing need to be noticed, you will have to check and configure your firewall to make your GCE instance be accessible externally.

By default, GCE opens only SSH port to outside, and all ports for internal.

If you have any purpose to open any port, I suggest you to create a new firewall to deal with this sort of operation.

like image 120
Colin Su Avatar answered Oct 14 '22 12:10

Colin Su