MultiCloud Marketplace

Ryan Geyer

Wordpress & Email All-In-One

Open in Dashboard

Published by Ryan Geyer on Feb 05, 2013Revision: 10



This is an All-In-One (AIO) server for hosting PHP based web sites/applications, as well as email for one or many domain names (virtual hosting).

LNMP Virtual Hosting

The web hosting environment is a full LNMP stack consisting of;

  • Linux - CentOS 5.8
  • Nginx - 1.2.2
  • MySQL - 5.1.55-community
  • PHP - 5.3.6

Email Virtual Hosting

In addition to the LNMP stack, a Postfix server is installed and configured for virtual hosting of one or many email domains. Currently, the postfix server is configured to relay email for configured email addresses (more information on that below) to one or more other email addresses. I use this to accept email for a domain, and effectively "forward" it to my gmail account where I manage all of my email.



Launching for the first time

If you've just imported this ServerTemplate from the library, here's what you need to know to get started.


  • Database Admin Password

    Pick a secure password for the database administrator. The default administrator username is "administrator". It's possible that you'll never need to use these credentials since the Chef recipes set everything up for you, but it's good to have in case of emergency or for administrative tasks not covered in an operational script etc.

  • Postfix MySQL Database Password

    Pick a secure password for the user account that postfix will use to access the MySQL database. Did I mention that Postfix configuration information is stored in MySQL? I promise, I'll explain later.

  • Total Volume Size (1)

    This server stores all of the data which needs to be persistent either on a separate attached storage volume, or on an LVM partition of your ephemeral storage to ease backups, disaster recovery, and vertical scaling. Specify a volume size here that makes sense for the data you're storing, including MySQL databases and your web site/application html and code files. NOTE: The default is 2GB

  • Backup Lineage (1)

For the attached volume, and for the continuous backups a lineage needs to be specified. This is effectively a name for the data backup, feel free to specify anything for this. For all of the volume management stuff I'm making heavy use of the RightScale "Storage Toolbox", and this input comes from those tools. Take a peek at the documentation and runbook for the "Storage Toolbox" here

  • Web Server Hostname

Some basic tools will get installed and hosted for this server on a particular hostname. These are things like phpmyadmin, and (hopefully, eventually) some web UI tools for managing your server. You can specify the hostname you want this to appear on. I recommend that you use a hostname specific to the management of this server, like etc.

If you're in a hurry, and just wanted to get this up and running quickly, that's all you'll need to know.


  • Cookbook: web_apache v13.2.0.6

  • Cookbook: apache2 v1.4.2.6

  • Cookbook: app_wordpress v0.0.2.6

  • Cookbook: block_device v13.2.0.6

  • Cookbook: build-essential v1.3.2.6

  • Cookbook: db v13.2.0.6

  • Cookbook: utils v0.0.1.6

  • Cookbook: db_mysql v13.2.0.6

  • Cookbook: sys_ntp v13.2.0.6

  • Cookbook: sys_firewall v13.2.0.6

  • Cookbook: sys_dns v13.2.0.6

  • Cookbook: sys v13.2.0.6

  • Cookbook: runit v0.16.2.6

  • Cookbook: rightscale_sandbox v0.0.1.6

  • Cookbook: rightscale v13.2.0.6

  • Cookbook: phpmyadmin v0.0.1.6

  • Cookbook: php5 v0.0.2.6

  • Cookbook: db_postgres v13.2.0.6

  • Cookbook: openssl v1.0.0.6

  • Cookbook: nginx v0.0.1.6

  • Cookbook: mysql v0.23.1.6

  • Cookbook: mail_postfix v0.0.2.6

  • Cookbook: logging_syslog_ng v13.2.0.6

  • Cookbook: logging_rsyslog v13.2.0.6

  • Cookbook: logging v13.2.0.6

  • Cookbook: lnmp_aio v0.1.0.6

  • Cookbook: iptables v0.11.0.6

  • Cookbook: perl v1.1.0.6

  • Cookbook Repo: of RightScale (v13.2) + LNMP

  • MultiCloudImage: RightImage_CentOS_6.3_x64_v5.8_XenServer [rev 8]

  • MultiCloudImage: SoftLayerImage_Storage_CentOS_6.3_x64_v5.8 [rev 2]

  • MultiCloudImage: RightImage_RHEL_6.3_x64_v5.8 [rev 3]

  • MultiCloudImage: RightImage_CentOS_6.3_x64_v5.8_KVM [rev 11]

  • MultiCloudImage: RightImage_CentOS_6.3_x64_v5.8_HVM_EBS [rev 4]

  • MultiCloudImage: RightImage_CentOS_6.3_x64_v5.8_EBS [rev 5]

  • MultiCloudImage: RightImage_CentOS_6.3_x64_v5.8 [rev 22]

  • Recipe: rightscale::install_tools

  • Recipe: sys::setup_swap

  • Recipe: sys_firewall::default

  • Recipe: sys_ntp::default

  • Recipe: rightscale::install_file_stats_collectd_plugin

  • Recipe: nginx::setup_vhost

  • Recipe: logging::default

  • Recipe: lnmp_aio::setup_lnmp_aio

  • Recipe: db_mysql::setup_server_5_1

  • Recipe: db::setup_privileges_application

  • Recipe: db::setup_privileges_admin

  • Recipe: db::setup_monitoring

  • Recipe: db::install_server

  • Recipe: block_device::setup_ephemeral

  • Recipe: block_device::do_secondary_restore

  • Recipe: block_device::do_secondary_backup

  • Recipe: rightscale::default

  • Recipe: block_device::do_primary_restore

  • Recipe: block_device::do_primary_backup_schedule_enable

  • Recipe: block_device::do_primary_backup_schedule_disable

  • Recipe: block_device::do_primary_backup

  • Recipe: block_device::do_force_reset

  • Recipe: block_device::do_delete_volumes_and_terminate_server

  • Recipe: block_device::default

  • Recipe: app_wordpress::update

  • Recipe: app_wordpress::deploy

  • Recipe: block_device::do_restore_or_setup_block_device_on_boot

  • RepoPath: RightScale (v13.2) + LNMP [rev 6]

  • RightScript: [OpsCode] Chef Run [rev 1]

  • RightScript: [OpsCode] Connect Node [rev 3]

  • RightScript: [OpsCode] Delete Node [rev 1]

  • RightScript: [OpsCode] Initial Chef Run [rev 1]

  • See More


Revision 10 | Feb 05, 2013

Fixed php-fpm monitoring Fixes for app_wordpress nginx vhost creation

Revision 9 | Dec 21, 2012

Updated to RightScale v13.2 Chef code. Particularly useful for LVM fixes/enhancements in block_device

Revision 7 | Aug 26, 2012

* Install postfix mysql_pgsql from centosplus on CentOS * Update app_wordpress to require nginx, apache, and php5 so that recipes can be run as operational scripts * Set LVM vg data size to 50% to prevent possible data corruption * Remove scheduler cookbook/recipe, using block_device continuous backups instead * Set max snapshots to 10. 7 Daily + 1 Weekly + 1 Monthly + 1 Yearly = 10


674bf88eceff2db33ab8780edd4b87f2Owen Hopkins on Sep 10, 2012 | Re: v7

A really well thought out template with detailed instructions. There are lots of options to play with but the instructions cover everything and the default options are ones that work well. Top marks!


1 Rating

Supported Clouds


All Users

Sign-up for RightScale

Support Information

Have problems? Have suggestions for improvement? Just wanna chat with a really cool guy that likes to automate cloud stuff?

Drop me a line