Site Development / Management Server Options

Whether you are building sites from scratch or helping to maintain a production site, you are going to need some place to do your development work and test updates that need to be rolled out to your sites.  You may even want to implement a pipeline process where you have development, test, and production versions of your sites.

What follows is a brief discussion of development server options

Local Development Site on a Desktop or Notebook

Several options exist for doing development on a regular computer (i.e. a workstation) that you use for general purposes.  With Macintosh computers, you are already running a Unix style operating system with all of the components needed to do web services - they just aren't enabled by default.  Linux based workstations are exactly the same.  With any kind of standard computer (Windows, Macintosh, or Linux), there are also add-on applications that will let you create a Unix style environment for doing web site development and management.  Some examples are:

  • MAMP (Windows or Macintosh; free and commercial versions)
  • Lando (Most major Operating Systems; free open-source)

Some upsides to a local development site are:

  • Available on that computer regardless of network availability
  • Full access to configure the instance as you wish (assuming you have admin rights to your computer)
  • Local operations will run as quickly as your computer can support

Some downsides to a local development site are:

  • To do development work, you have to have access to the particular computer that the site is on
  • Transferring large sites to and from the production server may be slow
  • Other developers cannot access your development site, since it's local to you

Development LAMP Virtual Machine on the Campus Network

As an alternative to a local development site on one of your workstation computers, your IT unit can help you get a LAMP (Linux, Apache, MySQL, PHP) virtual machine set up on the campus network that you can use for development.  One LAMP server can host multiple development sites, so you probably only need a single development server regardless of how many sites you manage or expect to build.

Some upsides to a LAMP development server on the campus network are:

  • Available from any workstation computer (desktop or notebook) you might be using
  • Transferring large sites to and from the production server should be fast, as you won't be going outside the campus network
  • Local operations will run as quickly as your virtual machine can support
  • Other developers can access your development site, since it's on a shared server

Some downsides to a LAMP development server on the campus network are:

  • To do development work, you have to have working network access
  • Depending on your IT staff policies, you may not have full access to the virtual machine to configure everything yourself

If you're concerned about security, keep in mind that a LAMP virtual machine can be firewalled at the network level to just the campus and the VPN (or even tighter, if needed).  You can also have your IT staff set up regular backups of your virtual machine so that the risk of losing anything is minimal - far less than if you are developing on a notebook computer.

Tips for Using a LAMP Development Virtual Machine

DNS Domains and Hostnames

Through Apache Virtual Host configurations, you can host as many sites as necessary on one LAMP server.  To manage this, it's helpful to have a dedicated web development sub-domain assigned to your server.  If you have DNS management access, then you could request such a domain and manage it yourself, adding CNAMEs to it as needed.  If you're not familiar with the intricacies of DNS and don't want to get into it, you can ask your IT staff about assigning a wildcard domain to your server.  What this means in layman's terms is that you'd have a domain like foo.unit.gatech.edu, and all possible names under it (e.g site1.foo.unit.gatech.edu, site2.foo.unit.gatech.edu, test1.foo.unit.gatech.edu, etc.) will be pointed to your development server.  With that configuration in place, you can just add a site to your Apache Virtual Host configuration with a hostname that falls under your assigned wildcard domain, and it should just work immediately.

Scripting is Your Friend

If you're expecting to work with a lot of sites over time, a site creation script can be very helpful.  Such a script would automatically add the right Apache configuration for your new site, and could even automatically create a MySQL database for the site.  If you're working with a standard content management system, the script could even install a fresh copy of that system.  The overhead needed for creating such a script that can do all of that might seem a bit high, but can really pay off when you need to spin up a site quickly.

Tracking is Important

If you're going to have multiple sites in your development environment, you absolutely must keep track of them and shut down or archive the ones you no longer need.  Even though your server may be firewalled, you still don't want to leave unattended sites on your server that aren't being patched regularly.

A simple approach is to make an archive directory in /var/www/ and move any site no longer needed to that directory.  At the same time, backup and remove the Apache configuration for the site so that Apache won't complain about the site's root directory not being where it used to be.  Later, if you decide to revive an old development site, you can just move things back where they used to be, and in the meantime, no one can get to that old site over the web.  Note: if you do revive an old development site built in any standard content management system or other third-party web application, be prepared to upgrade or patch it immediately to the latest release of that system!