As I’ve mentioned previously, I own an HP MediaSmart server. Up until recently I’ve used it to host both my jkshay.com domain as well as my wife’s thebumbleshack.com domain. If you’ve seen thebumbleshack.com, you’ll see that we’re currently in the process of downsizing, reducing our possessions and living a simpler, more harmonious lifestyle. That being said, I knew I was likely taking my server off-line (it’s a HUGE power hog) and needed a replacement solution.
We’ve used cloud servers at my current employer for several years, hosting several sites with e-mail and web services without issue. I just didn’t want to pay the high prices (upwards of $100/mo minimum) to replace something I *could* do for the cost of electricity, so I set out to find an affordable alternative – and I did.
In this article I will explain how to provision, configure and secure a linux cloud-based server to host multiple domains, providing both web and e-mail services. I use Linode for my hosting provider, as they seemed to be the least expensive provider I could find. I’ve also used RackSpace, and can recommend their service, although the price point is a little high.
I’ll give a brief overview of the entire process, then explain each step in detail.
- Provision cloud server (creates a linux host with a fixed IP and SSH access)
- Set system hostname, network configuration
- Install system updates
- Add system user, grant sudo access
- Secure SSH service (hacking attempts against your server are already happening)
- Implement and configure the firewall
- Install Virtualmin (provides easy configuration of multi-domain host)
- Add first domain to host
- Add first e-mail user to host
- Secure mail service
- Install and configure WordPress
- Install and configure Roundcube web-mail
- Create SPF Record
- Install and configure Fail2Ban (bans IP addresses from server access based on failed attempts)
This article is based upon the documentation and guides available at linode.com and other sites. I’ll provide links to the guides I used when appropriate, but I’m covering every step here as the guides may not align exactly with CentOS 7.
Let’s get started by provisioning our cloud server.
2 thoughts on “Configuring a cloud-based secure multi-domain web and e-mail server”
I use Exim as mail server and I installed opendkim using the instructions at
Awesome! To be perfectly honest, i went with postfix because it’s been the default I’ve seen installed with Virtualmin. Why did you choose to go with exim?