A cloud server is a logical server that is built, hosted and delivered through a cloud computing platform over the Internet. Cloud servers possess and exhibit similar capabilities and functionality to a typical server but are accessed remotely from a cloud service provider.

Read part 01 here before proceeding with part 02.

https://www.thinkspecific.com/build-cloud-web-server-part1/

This tutorial is the continuation of part 01 and will explain how to host a website in google cloud server. The following prerequisites are mandatory.

  • Google Account
  • Credit card for signing up with google cloud (no charges, just for verification).
  • Valid Domain with access to its dns.
  • Basic knowledge in html, python, putty application (beginner level is enough)

Step 2: Hosting a website in Google Cloud Server using serverpilot

  • Now you have a ready to host cloud server with google, we need some kind of third party softwares to make the hosting process easy.
  • Your instance (server) has a fresh Ubuntu installation, which needs some more software installations to work as web server, which will be done by server pilot.
  • goto https://manage.serverpilot.io/#signup to sign-up for a new account.
  • Once you sign-up, you will see the following. 
  • Click on connect a server button, you will see the following. 
  • Check the “i don’ have root password” option. and choose a good SFTP password (don’t forget it, you will need for SFTP access), and then click connect.
  • U will get a code from serverpilot as shown below. 
  • Copy the code completely.
  • Now goto compute engine page of google cloud console, click on SSH button and click open in browser window (make sure popup blocker is off) next to the ip address, a SSH terminal window gets opened.
  • Type the following codes and click enter.
  • sudo su
    
  • cd ~
  • now paste the copied code and click enter
  • Wait for scripts to install.
  • After few minutes you will see the following screen. 
  • Now return to serverpilot page and you can notice the installation showing a progress bar and once finished, you will see the following message. 
  • Click on create app button.
  • Give a name, type your domain name.
  • If you want to install wordpress, check the wordpress box.
  • That’s it, you have successfully hosted your first website in google cloud.
  • Explore various options in serverpilot. You can host any number of websites you want.
  • Note: before hosting your domain, change the A records of your domain to point to the server ip address and also add CNAME record for www with your naked domain name. (You can also use cloudflare for DNS hosting. Steps to setup cloudflare can be found here as seperate tutorial. https://www.thinkspecific.com/dns-hosting-cloudflare)
  • Happy hosting.
  • You can visit your domain in browser or simply type the ip address in browser where you can see default page of serverpilot.
The following two tabs change content below.
Specific Thinking in Science & Technology

Latest posts by Think Specific (see all)


Think Specific

Specific Thinking in Science & Technology

Leave your comments..