===== 環境変数から環境を判別して条件分岐 =====
・apache で [[http://httpd.apache.org/docs/current/mod/mod_env.html|mod_env]] を有効にする。
・virtualhost に [[http://httpd.apache.org/docs/current/mod/mod_env.html#setenv|setenv]] で任意のタグをつける
   ServerAdmin webmaster@test-test.com
   DocumentRoot "/var/www/vhosts/test-test.com"
   ServerName test-test.com
   DirectoryIndex index.php index.html
   
      SetEnv SERVER_ENV "taro"
   
・PHP でvirtualhost のタグを取得する
$tag = $_SERVER['SERVER_ENV'];
・必要に応じて、条件分岐に利用
switch($_SERVER['SERVER_ENV']) {
    case 'taro':
        $url_base = 'taro.com';
        break;
    case 'hanako':
        $url_base = 'hanako.com';
        break;
}