the luxury of invaluable experience.
1 Mar
After I have googled for a hole day, I have finished config on idaemon server
so, I have to note this down for future purpose.
We have to edit Bind and Apache to let this work, here are example of config files.
maindomain zone file
maindomain.com. IN SOA ns1.maindomain.com. admin.maindomain.com. (
1164635879
3H
1H
7D
120 )
maindomain.com. IN NS ns1.maindomain.com.
maindomain.com. IN NS ns2.maindomain.com.
maindomain.com. IN A 1.2.3.4
maindomain.com. IN MX 1 apmx.l.google.com.
maindomain.com. IN MX 3 alt1.aspmx.l.google.com.
maindomain.com. IN MX 3 alt2.aspmx.l.google.com.
maindomain.com. IN MX 5 aspmx2.googlemail.com.
maindomain.com. IN MX 5 aspmx3.googlemail.com.
maindomain.com. IN MX 5 aspmx4.googlemail.com.
maindomain.com. IN MX 5 aspmx5.googlemail.com.
mail.maindomain.com. IN CNAME ghs.google.com.
*.maindomain.com. IN A 1.2.3.4
otherdomain zone file
otherdomain.com. IN SOA ns11.otherdomain.com. admin.otherdomain.com. (
1154635879
3H
1H
7D
120 )
otherdomain.com. IN NS ns11.otherdomain.com.
otherdomain.com. IN NS ns12.otherdomain.com.
otherdomain.com. IN A 1.2.3.4
*.otherdomain.com. IN CNAME otherdomain.com.
httpd.conf
<VirtualHost *:80>
ServerName maindomain.com
DocumentRoot /var/www/html
<Directory “/var/www/html”>
AllowOverride All
allow from all
Options +Indexes
</Directory>
LogLevel emerg
</VirtualHost>
<VirtualHost *:80>
ServerName subdomain.maindomain.com
DocumentRoot /var/www/subdomain
<Directory “/var/www/subdomain”>
AllowOverride All
allow from all
Options +Indexes
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName otherdomain.com
ServerAlias www.otherdomain.com
DocumentRoot /var/www/vhosts/otherdomain.com
<Directory “/var/www/vhosts/otherdomain.com”>
AllowOverride All
allow from all
Options +Indexes
</Directory>
</VirtualHost>
Leave a reply