Fix undefined method `sort_by' error from vhost_location_empty.erb

In the template, we should check if the variable is defined before use it
Merge pull request #93 from ubc/fix-custom_cfg

Fix undefined method `sort_by' error from vhost_location_empty.erb