EDIT: This has worked for Lordek!
Please DO BACKUPS OF ALL FILES you're going to change!!!!!!!!!!
Please DO BACKUPS OF ALL FILES you're going to change!!!!!!!!!!
Please DO BACKUPS OF ALL FILES you're going to change!!!!!!!!!!
Please DO BACKUPS OF ALL FILES you're going to change!!!!!!!!!!
Please DO BACKUPS OF ALL FILES you're going to change!!!!!!!!!!
Ok,
Please DO BACKUPS OF ALL FILES you're going to change!!!!!!!!!!
Please DO BACKUPS OF ALL FILES you're going to change!!!!!!!!!!
Now...
This tutorial assumes you already created a user for your server domain on ispCP, if you didn't, DO!
Go to /etc/ispcp/bind/working
Code:
cd /etc/ispcp/bind/working
edit your domain file with your favorite editor (vi, pico, nano, etc...):
make your file look like this (please be aware you should change domain, subdomain and ip information according to your needs), basically you should only have to add the submain part on the end of the file
Code:
$TTL 12H
$ORIGIN domain.tld.
@ IN SOA ns1.domain.tld. postmaster.domain.tld. (
; dmn [domain.tld] timestamp entry BEGIN.
2008043000 ; Serial
; dmn [domain.tld] timestamp entry END.
8H ; Refresh
15M ; Retry
4W ; Expire
3H ; Minimum TTL
)
IN NS ns1.domain.tld.
IN NS ns2.domain.tld.
IN MX 10 mail.domain.tld.
domain.tld. IN A HEREGOESYOURSERVERIP
www IN A HEREGOESYOURSERVERIP
domain.tld. IN TXT "v=spf1 a mx ip4:HEREGOESYOURSERVERIP ~all"
localhost IN A 127.0.0.1
mail IN A HEREGOESYOURSERVERIP
ns1 IN A HEREGOESYOURNAMESERVER1IP
ns2 IN A HEREGOESYOURNAMESERVER2IP
; CNAME for mail transfer
imap IN CNAME mail
pop IN CNAME mail
pop3 IN CNAME mail
relay IN CNAME mail
smtp IN CNAME mail
; CNAME for web transfer
ftp IN CNAME www
; sub [admin.domain.tld] entry BEGIN.
admin IN A HEREGOESYOURSERVERIP
; sub [admin.domain.tld] entry END.
; sub [{SUB_NAME}] entry BEGIN.
; sub [{SUB_NAME}] entry END.
after saving file, copy it to your bind cache folder, usually on a debian system: /var/cache/bind/ overwriting the file in there
Code:
cp domain.tld.db /var/cache/bind/
now edit your zones file to remove the admin.domain.tld.db file
Code:
nano /etc/bind/named.conf
find something like
Code:
// dmn [admin.domain.tld] cfg entry BEGIN.
zone "admin.domain.tld" {
type master;
file "/var/cache/bind/admin.domain.tld.db";
notify YES;
};
// dmn [admin.domain.tld] cfg entry END.
and remove/comment it like
Code:
// dmn [admin.domain.tld] cfg entry BEGIN.
//zone "admin.domain.tld" {
// type master;
// file "/var/cache/bind/admin.domain.tld.db";
// notify YES;
//};
// dmn [admin.domain.tld] cfg entry END.
now restart bind
Code:
/etc/init.d/bind9 restart
if any error occurs, let us know in the forum...
now we'll edit the apache virtualhost settings for admin.domain.tld go to ispCP.
go to /etc/apache2/sites-available
Code:
cd /etc/apache2/sites-available
now edit your virtualhosts file to remove the *.domain.tld alias entry
now find something like this:
Code:
ServerName domain.tld
ServerAlias www.domain.tld domain.tld *.domain.tld
change it to
Code:
ServerName domain.tld
ServerAlias www.domain.tld domain.tld
after saving the file, copy it to /etc/ispcp/apache/working directory, overwriting the file there
Code:
cp ispcp.conf /etc/ispcp/apache/working/
now restart apache
Code:
/etc/init.d/apache2 restart
now all should work fine and domain.tld go to your site and admin.domain.tld go to ispCP
Let me know if it helped!!!