Developing ecommerce, conversion-oriented and transactional web apps since 1998.
Full stack PHP developer. Front end developer.


Here are a few sites that I've developed.

Averett University
Northwest Missouri State University
Talladega College
Morgan State University
The University of Texas Permian Basin
Warren Wilson College
Catawba College
Manhattanville College

How I setup this page using wildcard subdomains on Apache

Notice that this page and each of the portfolio pages uses a subdomain (, rather than a subdirectory ( Why?

Easy to maintain: wildcard subdomains do not require additional changes to DNS and web server configuration

For each addition to the portfolio, I only need to create a directory and upload the files. There's no need to add records to the DNS or add VirtualHost directives to the Apache config.

Easy to upload: subdomains allow links to work properly

Each site references root-level assets, meaning that the style sheets, images and javascript files are linked to from the web root. This would not work if these portfolio sites were in subdirectories. Therefore, I made them subdomains to avoid having to change all of the links and references to external files. How did I configure this and why did I choose that method?

Steps to setup wildcard subdomains on Apache

I added two A records to the DNS:

  •   IN A
  • *   IN A

Notice the second one starts with the * wildcard, which means that any subdomain off the subdomain points to

I added two virtual hosts to Apache, one for each of the two subdomains listed above.

VirtualHost for

<VirtualHost *:80>
DocumentRoot /sites/

VirtualHost for *

<VirtualHost *:80>
ServerAlias *
VirtualDocumentRoot /sites/

The first one uses ServerName and DocumentRoot, while the wildcard one uses ServerAlias and VirtualDocumentRoot. The %1 tells Apache to use whatever the wildcard subdomain is as the directory name (e.g., points to /sites/ In order for VirtualDocumentRoot to work, I enabled the module vhost_alias.load.