Cloud based multi-site hosting in a single web server

Recently I’ve set up cloud based shared web site system, which is hosting several customers’ web site in a single server. To do that what I’ve chosen stack is as follows;
  • Amazon Web Service EC2 micro instance
  • Windows Server 2012
  • Softaculous AMPPS
  • WordPress / Joomla

Our company uses Amazon Web Service as production server so it’s sort of given decision. However, AWS(Amazon Web Service) is well-known and reliable service so there might be no argue about choosing this as a cloud service.

After using AWS for a year, what I realized are

  • It’s a great solution for SME, because basically we don’t need to worry about hardware management. This is a peace of mind.
  • As many said, it’s flexible and eazy to increase server instances or change it’s computing power.
  • We can do anything on AWS server. Literally, there is no limit when it comes to what to do on the given server. It’s almost similar to having dedicated server.
  • But, because we can do anything on AWS server, there is nothing installed out of the box, meaning that whatever we want, we have to implement it by ourselves. Which is a difference from normal hosting companies that are supporting everything about web site hosting.
  • AWS API is quite useful to manage cloud service directly and pragmatically, for example, scheduled back up management can be used by AWS API SDK for each program language.

Windows Sever 2012

When it comes to using PHP based CMSes, Windows may not be a best choice as an OS, but when a team is used to Windows server and not for Linux, Windows can be more practical choice. Furthermore, windows on AWS can be accessed through Remote Desktop Connection, which is very easy to use. In case of Linux on AWS, developers have to use SSL connection through shell and FTP. This is normally inconvenient for windows based developers.

 

Softaculous AMPPS

The easiest way to run CMS like Joomla or WordPress on Windows server is installing AMP package, which all in one package that includes Apache, MySQL and PHP. In this kinds of packages, there are several options. Read this for reviews on several AMP options.

I’ve been using XAMPP for local development environment and found no problem. But, AMPPS is just better than XAMPP. AMPPS is as easy to install and use as other AMP packages and this support web based management service which is a simple version of cPanel. The function of this includes multi domain set up, ftp account management, and powerful script based web application install function. The script based web app install function let users to install web app like joomla by just one click, which is amazing.

After installation of AMPPS, works left to be done is easy. Just install any CMS you want using script based install through admin page or just install as a normal way of each CMS. And set up virtual host in Apache config file. That’s it.

All straight forward, but one thing a little bit be careful is AWS does not work with multi-domain setting of AMPPS admin and Script based CMS may not the best choice for multiple installation of the same CMSes. When setting up multi domain, AMPPS automatically write a virtual host configuration, but it is not compatible in AWS environment.

Thing is AWS uses elastic IP for each server instance, which is logically dedicated public IP, but it’s not a server’s attached IP that’s called in AWS as private IP. So, you have to set  up virtual host manually. Read this for virtual host setting in AWS. For general virtual host configuration manual, see this.

One last addition on this topic, one AWS server instance has one public ip, if you want to use SSL, you have to use install another server instance. Except that, now we can host multiple web server in a single AWS server instance, which is great.

 

1 comment

Leave a comment

Your email address will not be published.