|?DOCROOT=`HOME`/domains/`DOMAIN`/public_html|
|?REALDOCROOT=`HOME`/domains/`DOMAIN`/public_html|
|?OPEN_BASEDIR_PATH=`HOME`/:/tmp:/var/tmp:/usr/local/lib/php/|
|?ALLOW_OVERRIDE=AllowOverride AuthConfig FileInfo Indexes Limit Options=Indexes,Includes,IncludesNOEXEC,MultiViews,SymLinksIfOwnerMatch,FollowSymLinks,None|
|?SHARED_PHP=`HOME`/shared/php-dun|
<VirtualHost |IP|:|PORT_80| |MULTI_IP|>
|CUSTOM|
|?CGI=ScriptAlias /cgi-bin/ `DOCROOT`/cgi-bin/|
|*if USER="brandun"|
###################
# Alias per brandun
Alias /css-dun /home/|USER|/shared/css-dun
Alias /js-dun /home/|USER|/shared/js-dun
Alias /php-dun /home/|USER|/shared/php-dun
Alias /img-dun /home/|USER|/shared/img-dun
Alias /error /home/|USER|/error
Alias /font-dun /home/|USER|/font-dun
###################
|*endif|
ServerName www.|DOMAIN|
ServerAlias www.|DOMAIN| |DOMAIN| |SERVER_ALIASES|
ServerAdmin |ADMIN|
DocumentRoot |DOCROOT|
|CGI|
|USECANONICALNAME|
<IfModule !mod_ruid2.c>
SuexecUserGroup |USER| |GROUP|
</IfModule>
|*if HAVE_RUID2="1"|
<IfModule mod_ruid2.c>
RMode config
RUidGid |USER| |GROUP|
RGroups apache |SECURE_ACCESS_GROUP|
</IfModule>
|*endif|
CustomLog /var/log/httpd/domains/|DOMAIN|.bytes bytes
CustomLog /var/log/httpd/domains/|DOMAIN|.log combined
ErrorLog /var/log/httpd/domains/|DOMAIN|.error.log
|*if SUSPENDED_REASON|
<IfModule mod_env.c>
SetEnv reason |SUSPENDED_REASON|
</IfModule>
|*endif|
<Directory |DOCROOT|>
|*if CGI=""|
|ALLOW_OVERRIDE|
Options -ExecCGI
|*endif|
|*if HAVE_PHP1_FPM="1"|
RewriteOptions InheritBefore
RewriteCond %{REQUEST_FILENAME} -f
RewriteCond %{REQUEST_FILENAME} \.php$
RewriteRule ^/?(.*\.php(/.*)?)$ fcgi://socket=\%2fusr\%2flocal\%2fphp|PHP1_RELEASE|\%2fsockets\%2f|USER|.sock|DOCROOT|/$1 [P,E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
|*endif|
|*if HAVE_PHP2_FPM="1"|
RewriteOptions InheritBefore
RewriteCond %{REQUEST_FILENAME} -f
RewriteCond %{REQUEST_FILENAME} \.php|PHP2_ RELEASE|$
RewriteRule ^/?(.*\.php|PHP2_RELEASE|(/.*)?)$ fcgi://socket=\%2fusr\%2flocal\%2fphp|PHP2_RELEASE|\%2fsockets\%2f|USER|.sock|DOCROOT|/$1 [P,E=HTTP_AUTHORIZATION:% [P,E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
|*endif|
|*if HAVE_PHP1_FCGI="1"|
<IfModule mod_fcgid.c>
<FilesMatch "\.php$">
AddHandler fcgid-script .php
FCGIWrapper "/usr/local/safe-bin/fcgid|PHP1_RELEASE|.sh /usr/local/directadmin/data/users/|USER|/php/|DOMAIN|.ini" .php
Options +ExecCGI
</FilesMatch>
</IfModule>
|*endif|
|*if HAVE_PHP2_FCGI="1"|
<IfModule mod_fcgid.c>
<FilesMatch "\.php|PHP2_RELEASE|$">
AddHandler fcgid-script .php|PHP2_RELEASE|
FCGIWrapper "/usr/local/safe-bin/fcgid|PHP2_RELEASE|.sh /usr/local/directadmin/data/users/|USER|/php/|DOMAIN|.ini" .php|PHP2_RELEASE|
Options +ExecCGI
</FilesMatch>
</IfModule>
|*endif|
|*if HAVE_SAFE_MODE="1"|
php_admin_flag safe_mode |SAFE_MODE|
|*endif|
|*if CLI="1"|
php_admin_flag engine |PHP|
php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f |USER|@|DOMAIN|'
|*endif|
|*if OPEN_BASEDIR="ON"|
php_admin_value open_basedir |OPEN_BASEDIR_PATH|
|*endif|
|*if SUPHP="1"|
suPHP_Engine |PHP|
suPHP_UserGroup |USER| |GROUP|
SetEnv PHP_INI_SCAN_DIR /usr/local/directadmin/data/users/|USER|/php/|DOMAIN|
|*endif|
</Directory>
|*if HAVE_PHP_FCGI="1"|
RewriteEngine on
RewriteOptions inherit
|*endif|
|*if USER="brandun"|
#######################
# Directory settings for shared php scripts
<Directory |SHARED_PHP|>
suPHP_Engine |PHP|
suPHP_UserGroup |USER| |GROUP|
</Directory>
|*endif|
|HANDLERS|
|MIMETYPES|
</VirtualHost>