This post shows students and new users the steps to install the Nginx HTTP server on the Google Cloud server with Ubuntu Linux. If you want to run a website online, you will need a web server. Nginx is one of the most popular open source servers in use today and an excellent web server for running online websites.

This is the fourth post in this series that can be used as a beginner’s guide to learning how to create a website domain, configure a Google Cloud server with Ubuntu Linux, and install software and packages to create and run an online website.

Now that you have learned how to create a website domain and configure a Google Cloud server, this post shows you how to install the Nginx HTTP web server.

A web server allows content to be published and served to web clients and your audience browsing your website.

In our first post, we mentioned that after creating a domain name, it cannot be used until it is forwarded or pointed to a server. In the second post, we showed you how to point a domain to a server that we created.

At this point, we are ready to connect to our Google Cloud server and begin installing software and packages that will be used to run an online website.

How to connect to the Google Cloud server

The Google Cloud (Compute Engine) server allows users to connect using SSH from the browser window to your virtual machine (VM) instance from within the Google Cloud Console.

YOU CAN ALSO READ:   Clash of Clans: Ultimate Guide for Beginners

Browser SSH supports the following:

  • web browsers
    • Latest version of Google Chrome
    • Firefox
    • Microsoft Edge
    • Microsoft Internet Explorer 11 and later
    • Safari 8 and later. Please note that Safari in private browser mode is not supported.
  • Virtual machine configurations
    • All Linux VM images that are available natively on Google Cloud.

No additional software or browser extensions are required. Just log in to the Google Cloud Console and go to Menu ==> Compute Engine ==> VM instances.

In the list of virtual machine instances, click SSH in the row of the instance you want to connect to.

establish ssh connection to vm instances

Alternatively, you can open an SSH connection to an instance by clicking its name and clicking SSH from the instance details page.

An SSH terminal window will open with the Ubuntu Linux instance that was created in the second posts in the series.

You should now be able to run commands on Ubuntu Linux created on the Google Cloud server.

connect to the host of the Google cloud instance

How to install Nginx on Ubuntu Linux on Google Cloud Server

Installing Nginx on Ubuntu Linux is no different, whether it’s on Google Cloud or on a local VM instance.

Nginx packages are available in the default Ubuntu repositories. One can simply use the apt to get commands to download and install the Nginx HTTP server on Ubuntu Linux.

A details and help post on how to install Nginx on Ubuntu Linux is at the link below. Click on it for more information on how to install and manage the Nginx HTTP server on Ubuntu Linux.

How to install Nginx on Ubuntu Linux

YOU CAN ALSO READ:   How to add subtitles in CapCut

With the Nginx web server installed, your domain name should now be able to open a default Nginx help page when someone browses your domain name.

Go ahead and type your domain name in the browser, and you should see an example page similar to the following:

http://example.com

ubuntu self-signed nginx certificates

As you can see, your Google Cloud hosted server is now resolving your domain name and server content with the Nginx HTTP web server.

We will continue to add other servers and software so that you can run a functional website online.

Conclusion:

In this tutorial we have seen how to use the HTTP Nginx web server on Ubuntu Linux on Google Cloud. If you find any errors above or have something to add, use the comment form below.

Write A Comment