• You MUST read the Babiato Rules before making your first post otherwise you may get permanent warning points or a permanent Ban.

    Our resources on Babiato Forum are CLEAN and SAFE. So you can use them for development and testing purposes. If your are on Windows and have an antivirus that alerts you about a possible infection: Know it's a false positive because all scripts are double checked by our experts. We advise you to add Babiato to trusted sites/sources or disable your antivirus momentarily while downloading a resource. "Enjoy your presence on Babiato"

Hosting a site on google cloud compute or Amazon AWS with virtualmin in 10 minute

sonu1

New member
Jan 28, 2019
16
10
3
India
Guys today I am going to tell you how to host a website on free Amazon AWS or Google cloud compute or digital ocean. All these three sites give free hosting with some limitation. In Amazon AWS you get 1 core vcpu 1gb ram and 30gb SSD. Google cloud gives free 300USD credit and if you use 2vcpu 2gb ram 15gb SSD it will take 9-10 months to consume the data. I have not tried Digital ocean, but I have heard that they give 100USD credit.
Now lets Start.
Creating an EC2/VM instance
Select 16.04 LTS image file 25Gb for amazon aws and 10-15 GB SSD in google cloud.Capture.JPG 11394
Assigning Static IP
Search 'external ip and change the VM ip from dynamic to static. This is necessary otherwise ip may change after some time or restart.
Setting up Virtualmin
Virtualmin is a free cpanel alternative with similar features. We will use them as they are most preferred after cpanel.
Now go to ssh panel and type the following commands one by one, if prompted type y in all situation. Click on SSH in cloud compute vm instances, and a terminal will open.
sudo wget http://software.virtualmin.com/gpl/scripts/install.sh
sudo /bin/sh install.sh


This will install Virtualmin. It will take 10 minutes approx. If there is any query on terminal use default or yes.
Creating a password for user "root"
sudo su
sudo passwd root

Now the terminal will ask for the password. Keep it ready and a strong one. Use control + V to paste the password. (Password will not show on the terminal, type CTRL +v twice to confirm the password

Now your site is active type https://externalip:10000. And your Virtualmin terminal will open. Use user root and its password to log in. (ignore self-signed security warning). A configuration wizard will open extra feature depend on your need. ( all the options are optional except mysql)

Pointing the domain
Visit ur domain registrar and add 'A' record in DNS management as follows
(Blank).Domain.com - IPV4 = external ip
Mail.domain.com - IPV4 = external ip
www.domain.com - IPV4 = external ip

(It will take 10-15 min to update A record)

alternatively, you can use DNS zone of google cloud
create aliases in DNS zone in google cloud compute
as mail, www. and point it to your external ip.
Now you can go to your site through the domain name.

Migration of your site
If you are starting a site, you can install WordPress and can go on blogging. If you are migrating then follow these steps.
Now you need to do everything through Virtualmin panel
Create a server - put in your domain name - put everything as such,
Generate ssl certificate through let's encrypt(already installed)
Configure php to upload bigger size DB(default is 2mb only)
Install phpmyadmin through script installer. Visit your domain/phpmyadmin and log in using DB name and password generated in the configuration wizard. Now import your DB. (if DB is single file and gives warning try to create a DB backup where all its tables are separate and upload one by one, most of the time wp_options are very big, unnecessary and corrupted)
Now upload your public HTML file using file manager and extract it in home/domain/public_html/.
Edit new DB name, DB username, and DB password in wp_config.php. Now your site is live as it was earlier.

Amazon Aws is also similar.
 
Last edited:
Digital Ocean $100 promo code is valid only for 2 months.
 

Attachments

  • Screen Shot 2019-04-25 at 7.37.21 AM.png
    Screen Shot 2019-04-25 at 7.37.21 AM.png
    25.9 KB · Views: 73
Now i use cyberpanel with openlitespeed. to host my sites. it is more simpler to install and is muxh faster thanapache/nginx .
 

Attachments

  • cyberpanel.JPG
    cyberpanel.JPG
    164.6 KB · Views: 10
Hi Sonu1,
When you have some free time, could you please put some step-by-step tutorial on how to use the free cloud options to setup a wordpress site. Or if you know any good tutorials for this, could you point that to us. It will be helpful for a lot of newbies like me. Thanks.
 
  • Like
Reactions: Supremo DM
I've done this in the past works super fast management can get a bit tricky if you run into support issues
 

Forum statistics

Threads
78,865
Messages
1,128,020
Members
246,590
Latest member
rootsum
AdBlock Detected

We get it, advertisements are annoying!

However in order to keep our huge array of resources free of charge we need to generate income from ads so to use the site you will need to turn off your adblocker.

If you'd like to have an ad free experience you can become a Babiato Lover by donating as little as $5 per month. Click on the Donate menu tab for more info.

I've Disabled AdBlock