http://help.directadmin.com/item.php?id=3
并輸入以下代碼
|*if SUB="subname"|
|?DOCROOT=/the/new/path/you/want|
|*endif|
cd /usr/local/directadmin/data/templates/custom
cp ../virtual_host2*_sub.conf .
|?DOCROOT=`HOME`/domains/`DOMAIN`/public_html|
并把它改為:|?DOCROOT=`HOME`/domains/`DOMAIN`/public_html/`SUB`|
同樣要更改這一行:|?CGI=ScriptAlias /cgi-bin/ `DOCROOT`/`SUB`/cgi-bin/|
把它改為:|?CGI=ScriptAlias /cgi-bin/ `DOCROOT`/cgi-bin/|
第三行最后一次更改:DocumentRoot |DOCROOT|/|SUB|
把它改為:DocumentRoot |DOCROOT|
保存2 virtual_host2 * _sub.conf這3個(gè)改變,然后正常進(jìn)行第1步,路徑將是你要找的。 所有現(xiàn)有的子域名也不會(huì)受到影響,因?yàn)槲覀儎倓倧牡撞恳苿?dòng)子部分,并將其移至頂部。
3)同樣,如果您只更改域的路徑而不更改任何子域,則可以使用
|*if !SUB|
|?DOCROOT=/the/new/path/you/want|
|*endif|