| | |
| | | $vhost_data['ssl_domain'] = $data['new']['ssl_domain']; |
| | | $vhost_data['has_custom_php_ini'] = $has_custom_php_ini; |
| | | $vhost_data['custom_php_ini_dir'] = escapeshellcmd($custom_php_ini_dir); |
| | | |
| | | // Custom Apache directives |
| | | // Make sure we only have Unix linebreaks |
| | | $vhost_data['apache_directives'] = str_replace("\r\n", "\n", $vhost_data['apache_directives']); |
| | | $vhost_data['apache_directives'] = str_replace("\r", "\n", $vhost_data['apache_directives']); |
| | | |
| | | // Check if a SSL cert exists |
| | | $ssl_dir = $data['new']['document_root'].'/ssl'; |
| | |
| | | |
| | | // Rewrite rules |
| | | $rewrite_rules = array(); |
| | | if($data['new']['redirect_type'] != '') { |
| | | if($data['new']['redirect_type'] != '' && $data['new']['redirect_path'] != '') { |
| | | if(substr($data['new']['redirect_path'],-1) != '/') $data['new']['redirect_path'] .= '/'; |
| | | if(substr($data['new']['redirect_path'],0,8) == '[scheme]'){ |
| | | $rewrite_target = 'http'.substr($data['new']['redirect_path'],8); |
| | |
| | | } |
| | | $app->log('Add server alias: '.$alias['domain'],LOGLEVEL_DEBUG); |
| | | // Rewriting |
| | | if($alias['redirect_type'] != '') { |
| | | if($alias['redirect_type'] != '' && $alias['redirect_path'] != '') { |
| | | if(substr($alias['redirect_path'],-1) != '/') $alias['redirect_path'] .= '/'; |
| | | if(substr($alias['redirect_path'],0,8) == '[scheme]'){ |
| | | $rewrite_target = 'http'.substr($alias['redirect_path'],8); |