fragment vhosts.conf
<VirtualHost *:80>
ServerAdmin admin@aaa.pl
DocumentRoot /home/httpd/html
ServerName aaa.pl
ErrorLog /var/log/httpd/aaa.pl-error_log
CustomLog /var/log/httpd/aaa.pl-access_log common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin admin@aaa.pl
DocumentRoot /home/httpd/html/www
ServerName aaa.com
ServerAlias www.aaa.com
ServerAlias aaa.com
ErrorLog /var/log/httpd/aaa.com-error_log
CustomLog /var/log/httpd/aaa.com-access_log common
</VirtualHost>
fragment named.confzone "aaa.pl" IN {
type master;
file "aaa.pl.zone";
allow-transfer { 80.50.50.50; };
};
zone "localhost" IN {
type master;
file "localhost.zone";
allow-update { none; };
allow-transfer { any; };
};
zone "0.0.127.in-addr.arpa" IN {
type master;
file "127.0.0.zone";
allow-update { none; };
allow-transfer { any; };
};
zone "." IN {
type hint;
file "root.hint";
};
zone "aaa.com" IN {
type slave;
file "aaa.com.zone";
masters {
x.x.x.x;
};
allow-query { any; };
allow-transfer { any; };
};
Efekt jest taki, że po wywołaniu
aaa.com nie otwiera się strona w katalogu
/home/httpd/html/www, a strona w
aaa.pl
W
x.x.x.x wpisałem IP domeny
aaa.pl i jest ono takie samo jak
aaa.com