Multiple Hosting using Linux Server on Google Cloud Infrastructure
Multiple website hosting is a very commonly used case for small to medium size businesses. This is a widely used concept by hosting providers. Google Cloud Platform powers MDH by providing reliable and low-latency services.

Multiple Domain Hosting in Google Cloud is used to host multiple domain names, or websites, under a single web hosting account. It will definitely save your money since you can sign up for an account with one company and manage your websites from a central location.
Since on the same hosting account all the domains would be hosted, therefore, you can administer each domain simultaneously through the same control panel.
Publish your domain names using Google's infrastructure for production-quality, high-volume DNS services. Google's global network of anycast name servers provide reliable, low-latency authoritative name lookups for your domains from anywhere in the world.
Creation Of Subdomains Using Cloud DNS:
- Goto GCP console by typing console.cloud.google.com in the browser
- Navigate to Network Services -> Cloud DNS
- Assuming the zone and DNS name is already created for the domain
- Enter into the zone -> Click on Add record set to add a subdomain for the domain
Goto GCP console by typing console.cloud.google.com in the browser
Process Of Hosting Multiple Websites In A Single Virtual Server:
Execute the below commands to host multiple websites-
- cd /etc/apache2/sites-available/
- cp 000-default.conf subdomain.domain_name.conf
where, cp source_file destination_file
- Edit the file and add the following lines to the file and save it.
nano subdomain.domain_name.conf
(<VirtualHost *:80>
ServerName domain_name
ServerAlias www.subdomain.domain_name
ServerAdmin webmaster@domain_name
DocumentRoot /var/www/domain_name/
</VirtualHost>)
- cd /var/www/
- mkdir subdomain.domain_name
- cd subdomain.domain_name
- nano
index.html(<html><head><title>Hello</title></head><body><h1>Test Subdomain Page</h1></body></html>) - systemctl restart apache2
- Now hit subdomain.domain_name