Webarena 20GBへサーバ移行作業、DNS設定変更メモ。
前準備
ドメイン取得業者にて、DNS設定変更。ネームサーバーのIPアドレスを新しいものに更新する。
FTPにてフォルダを作成
mkdir /var/www/sites/hoge
Webデータ転送
ネームサーバ更新
vi /etc/named.conf
zone "hoge.info" IN {
type master;
file "hoge.info";
allow-update { none; };
};
type master;
file "hoge.info";
allow-update { none; };
};
ドメイン別設定
vi /var/named/hoge.info
$TTL 86400
@ IN SOA ns.hoge.info. root (
2007080101 ; serial
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS ns.hoge.info.
IN MX 10 @
IN A 123.123.123.123
ns IN A 123.123.123.123
www IN A 123.123.123.123
@ IN SOA ns.hoge.info. root (
2007080101 ; serial
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS ns.hoge.info.
IN MX 10 @
IN A 123.123.123.123
ns IN A 123.123.123.123
www IN A 123.123.123.123
設定チェック
named-checkzone hoge.info /var/named/hoge.info
ネームサーバ更新
service named reload
Apache設定変更
vi /etc/httpd/conf/httpd.conf
最下部に追記
<VirtualHost *:80>
ServerAdmin hoge@hoge.info
DocumentRoot /var/www/sites/hoge
ServerName www.hoge.info
ErrorLog logs/hoge.info-error_log
CustomLog logs/hoge.info-access_log common
</VirtualHost>
ServerAdmin hoge@hoge.info
DocumentRoot /var/www/sites/hoge
ServerName www.hoge.info
ErrorLog logs/hoge.info-error_log
CustomLog logs/hoge.info-access_log common
</VirtualHost>
httpd.conf設定チェック
/usr/sbin/httpd -t
Apache再起動
service httpd restart
結果
「.net」は直ぐ適用された!本当に数分後。でも「.info」は、12時間経過したがいまだ適用されず…。ミスが無ければ良いのだが。→更新された。理由はセカンダリのネームサーバを指定していなかったため。。
特に移行元のApacheやネームサーバの設定は変更しなくても良さそう。
2007/08/02


