Setting up webmail.domain.com as default for new domains – DirectAdmin


1) You’ll need to setup the virtualhost for apache.  This can be accomplished by adding a 2nd virtualhost along side the domains main one.

cd /usr/local/directadmin/data/templates
cp virtual_host.conf custom
cd custom

You’ll need to edit the newly copied virtual_host.conf (or virtual_host2.conf if you’re using apache 2) file and make the file look like (just add the blue to the end of whatever you currently have)

|?DOCROOT=`HOME`/domains/`DOMAIN`/public_html|
|?OPEN_BASEDIR_PATH=`HOME`/:/tmp:/usr/local/lib/php/|

|CUSTOM|
|?CGI=ScriptAlias /cgi-bin/ `DOCROOT`/cgi-bin/|
ServerName www.|DOMAIN|
ServerAlias www.|DOMAIN| |DOMAIN| |SERVER_ALIASES|
ServerAdmin |ADMIN|
DocumentRoot |DOCROOT|
|CGI|

|USECANONICALNAME|

User |USER|
Group |GROUP|
CustomLog /var/log/httpd/domains/|DOMAIN|.bytes bytes
CustomLog /var/log/httpd/domains/|DOMAIN|.log combined
ErrorLog /var/log/httpd/domains/|DOMAIN|.error.log


Options +Includes -Indexes
php_admin_flag engine |PHP|
php_admin_flag safe_mode |SAFE_MODE|
php_admin_value sendmail_path ‘/usr/sbin/sendmail -t -i -f |USER|@|DOMAIN|’
|*if OPEN_BASEDIR=”ON”|
php_admin_value open_basedir |OPEN_BASEDIR_PATH|
|*endif|


|HANDLERS|
|MIMETYPES|

Bài viết này có ích cho bạn không? 0 phiếu cảm nhận dễ hiểu & thực hiện (3 Phiếu)