Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: Cannot modify header information - headers already sent by (output started at /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php:340) in /home/tetch1987/tetch1987.com/public_html/shittakabull/wp-includes/feed-rss2.php on line 8
サーバ – ShitTakaBull by tetch1987 https://tetch1987.com/shittakabull WordPress関連やjQueryなどウェブ制作のテクニックデータベース Wed, 28 Mar 2018 06:45:12 +0000 ja hourly 1 https://wordpress.org/?v=7.1.5 ウェブ閲覧やメールの送受信の仕組みを例えながら説明 https://tetch1987.com/shittakabull/web/how-web-or-email-works/ https://tetch1987.com/shittakabull/web/how-web-or-email-works/#respond Wed, 28 Mar 2018 06:42:50 +0000 https://tetch1987.com/shittakabull/?p=795 ウェブサイトの閲覧やメールの送受信の仕組みはどのような仕組みになっているのか、買い物に例えながら説明してみます。ウェブサイトを閲覧する時どのようなことをしているかというと、インターネットを経由してサーバ上からデータを引っ張ってきています。ウェブサイトに表示されているテキスト情報や画像などは全てサーバ上に置かれているんですね。これはお店に行って、お店に置いてあるリンゴを買って帰るイメージです。無理あるかもしれませんが、大体こんな感じです。

「シッタカ果物屋」に行く
URLにドメインを指定
アドレス帳を開いて店名から住所を調べる
DNSへ接続してドメインからサーバのIPアドレスを取得
お店までタクシーで行く
プロバイダを通じてインターネット通信を行う
タクシーでお店へ行ってリンゴ買って帰る
サーバへ接続してデータをダウンロードしてサイトを閲覧
お店の郵便受けから手紙を持って帰る
サーバへ接続してメールを受信する

目次

ドメインは店名

まずはどこのサーバに接続するかを指定します。店名が分からなければ何処からリンゴを買えばいいのか分かりませんもんね。どこのサーバに接続するかは、「sample.com」のようなドメインで指定します。「”シッタカ果物屋に行って”リンゴを買ってくる」といった具合に、店名を指定するイメージです。
GoogleやYahooなどの検索サイトを利用してサイトを見る人が多いと思いますが、それらはリンクを表示しているだけであって、最終的にリンク先のドメインを指定してそのサーバからデータを引っ張ってきています。検索サイトは案内サービスをしているお店って感じですかね。
注意点として同じドメイン名があっては困るので、同じドメイン名は登録できません。「シッタカ果物屋 大通り店」とか、「シッタカ果物屋2号店」とか、違う名前にしないといけません。少しでも違えば大丈夫です。

IPアドレスはお店の住所

じゃあ指定したドメインのサーバはどこにあるのでしょうか?店名だけ分かってもお店の住所が分からないと辿り着けません。ウェブサイトで利用されるサーバには、お店の住所と同じようにそれぞれ固有のIPアドレスが振られています。IPアドレスは123.456.789のように無機質な羅列になっています。
でも、店名が分からなくても住所が分かればお店にいけますよね。実際、IPアドレスを指定してもサーバへ接続を試みることはでき、きちんとウェブサイトを表示できる場合もあります。しかし、お店も一軒家タイプだったりショッピングモールの中に入っていたりするように、サーバにも専用サーバや共有サーバが存在して、一つのIPアドレスに対していくつものドメインを登録している場合があります。そんな時、メインとなるドメインのサイトを表示するサーバもあれば、サーバの管理会社の表示がされることもあるのです。

DNSはアドレス帳

ここで、なぜドメインからサーバへ接続できるか不思議ですね。「シッタカ果物屋」の住所を教えてくれる存在が必要です。
ブラウザからウェブサイトを見るとき、実は裏ではドメインとIPアドレスを結び付けるためにドメインネームサーバ(DNS)というサーバへの接続を挟んでいて、そのネームサーバが「このドメインね、このIPアドレスだよ」と住所を教えてくれています。アドレス帳から「シッタカ果物屋」を探して住所を調べるイメージです。「北海道札幌市中央区…」より「シッタカ果物屋」の方が覚えやすいですよね。DNSはこのアドレス帳のような役割を果たしています。DNSはドメインを指定したらIPアドレスと結び付けてくれる、なくてはならない存在です。

DNSの仕組み

また、1つのDNSが全てのアクセスをこなしているかというとそうではありません。世界中の大量のアクセスを上手くさばくために、ドメインを分割して参照するネームサーバを切り分けています。数多くあるドメインの中から「シッタカ果物屋」を1冊のアドレス帳から探すのにのは大変ですもんね。
「sample.co.jp」というドメインの場合、ドメインの後ろから参照していきます。まずは「jp」のネームサーバを参照し「co.jp」のネームサーバへ接続します。次に「co.jp」のネームサーバが「sample.co.jp」が登録されているネームサーバを参照してIPアドレスを取得する流れです。「〇屋」をまとめたアドレス帳から「果物屋」のアドレス帳がどこにあるかを探し、「果物屋」のアドレス帳から「シッタカ果物屋」の住所が載っているアドレス帳を探すイメージですね。一見面倒なように感じますが、1冊の分厚いアドレス帳を皆で使うと大変です。役割を分割することよって世界中からの大量のアクセスをうまくさばくことができます。
最初のトップレベルドメインと言われる「jp」や「com」はそれぞれ企業や組織が管理しているのですが、では一番最初の「jp」や「com」はどこか教えてくれるのは誰でしょうか?ルートサーバと呼ばれるDNSが存在します。トップレベルドメインの前に一番最初に訪れる場所になるわけですが、世界に13個のルートサーバーがあるそうですよ。へぇー。。。
「sample.co.jp」の場合は以下のような流れになるわけですね。

  1. 1)ルートサーバに「jp」ドメインの場所を聞く
  2. 2)jpネームサーバに「co.jp」のドメインの場所を聞く
  3. 3)co.jpネームサーバに「sample.co.jp」の場所を聞く
  4. 4)sample.co.jpのあるネームサーバ

最終的に「4)sample.co.jpのあるネームサーバ」がIPアドレスを教えてくれるわけですが、そのDNSは大抵ドメイン管理会社やレンタルサーバ会社が用意しています。つまり、「1)」や「2)」、「3)」のネームサーバはそれぞれ管理しているのが違うんですね。
これでお店までの道のりは完璧です。ドメインからネームサーバへ接続してIPアドレスをゲットして、サーバの場所が分かったのです。

プロバイダはタクシー会社

次にどのように接続するか。お店までの交通手段です。ネット回線が通っている状態では、言ってみれば道路が通じているだけ。実際にネットに接続するためにはプロバイダとの契約が必要です。NTTやauなどですね。
彼らはタクシー会社のようなイメージです。お店までに行くためにタクシー会社と契約してタクシーを手配する感じ。これでお店に行き、リンゴを要求して持って帰ることができるわけです。

DNSキャッシュサーバはタクシー運転手

PCなどからドメインへの接続を指定した際、代わりにIPアドレスを聞いて回ってくれる存在がいます。それがDNSキャッシュサーバーです。「シッタカ果物屋まで」と言われ、アドレス帳を索引して住所を調べてくれるタクシー運転手のような存在です。
そしてこのDNSキャッシュサーバー、毎回ルートサーバに聞きに行く訳ではなく、一度IPアドレスを割り出したら保存する機能が付いています。保存したIPアドレスを参照してくれるので、ルートサーバーへ接続する手間が省けるのです。
タクシー運転手さんが知っている場合は、住所を調べずに場所に直接行くようなものですね。便利なようですが、ここがサーバ移管にとっては注意しなくてはならない点になります。

ウェブサイト閲覧は誰でもできる買い物、メール送受信は郵便受けから手紙を持ち帰る

ウェブサイト閲覧もメールの送受信も流れ自体は同じようなものです。サーバ上にあるデータをダウンロードして表示するのか、メールをダウンロードして表示するのか。しかし、ウェブサイトは基本的に誰でも見ることができるようになっていますが、メールは見られたら困ります。お店に届いた手紙を誰でも見られたら困りますよね。
そのためウェブサイト閲覧とメールの入り口が異なっており、メールにはユーザー名とパスワードを利用した設定が必要です。郵便受けの暗証番号のようなものです。
こうしてお客さんはお店の正面玄関から入ってリンゴを買い、お店のスタッフはお店の裏口から入り自分宛の手紙を受け取ることができるんですね。

]]>
https://tetch1987.com/shittakabull/web/how-web-or-email-works/feed/ 0
ラピッドサイトからエックスサーバーへのサーバ移転 https://tetch1987.com/shittakabull/web/%e3%83%a9%e3%83%94%e3%83%83%e3%83%89%e3%82%b5%e3%82%a4%e3%83%88%e3%81%8b%e3%82%89%e3%82%a8%e3%83%83%e3%82%af%e3%82%b9%e3%82%b5%e3%83%bc%e3%83%90%e3%83%bc%e3%81%b8%e3%81%ae%e3%82%b5%e3%83%bc%e3%83%90/ https://tetch1987.com/shittakabull/web/%e3%83%a9%e3%83%94%e3%83%83%e3%83%89%e3%82%b5%e3%82%a4%e3%83%88%e3%81%8b%e3%82%89%e3%82%a8%e3%83%83%e3%82%af%e3%82%b9%e3%82%b5%e3%83%bc%e3%83%90%e3%83%bc%e3%81%b8%e3%81%ae%e3%82%b5%e3%83%bc%e3%83%90/#respond Tue, 16 Aug 2016 12:52:42 +0000 http://tetch1987.com/shittakabull/?p=624 先日行ったラピッドサイトからエックスサーバへのサーバ移転についてです。

移転の経緯

仕事でもラピッドサイトを使っていたのだけどメールエラーが出てしまったりもっさりと感じることが多くなっていました。電話対応はよかったのでこの個人サイトでも引き続き使っていたのですが、移転を考え始めたのが去年(2015年)の春過ぎ。サービス移転ということでIPアドレスは変わるわ数時間停まるわで、仕事の方で利用していたサイトの対応に追われる羽目に。その後、サーバを再起動しないとsendmailが機能しなくなったり(改善策はあるらしいですが)、FFFTPでは「暗号化無し」を選択しないと繋がらなくなったり、WordPress管理画面上からはプラグインをインストールできなかったりと、ダウングレード感がしたサービス移転でした。その上料金は契約時のままなので、新しくなった安いVPSプランが適用される訳でもなく、変更するためにはサーバ移転作業を要すると聞いた時は他のレンタルサーバ会社でもいんじゃないかと思い始めました。

エックスサーバの感想

正直サービス移転からなかなか電話が繋がらなくなったラピッドサイト。前まではすぐ出てくれたと思ったのですが。エックスサーバにしたらそのせいもあってかすぐ電話に出てくれるのはとてもありがたく感じるのでした。スピード感に関しても大分エックスサーバの方が早い印象があります。もっさりの原因をいつか見ないとなーと思っていたものの、エックスサーバに移転しただけで個人的には気にならないくらいになってしまいました。あとはエックスサーバーの場合、アップグレードしてくれるのでその辺も嬉しいです。正直サーバに関してはレンタルサーバ会社にやって欲しいと思っていたので。Windows10のアップグレードではないですが、サービスをどんどん更新していくのは時代にマッチしているのではないかと思います。

移転の流れ

  1. まずはエックスサーバを契約します。現時点でプランは3つありますが、後でこちらの作業なくバージョンアップできる(無料)そうなので、x10から始めてもいいのではないかなと思います。
  2. 次にエックスサーバのサーバ管理画面からドメインを追加します。サーバ移転なのでそのドメインの所有者である必要がもちろんあります。
  3. ラピッドサイトからデータを引っこ抜き、エックスサーバへアップします。この時、まだ契約していなければFTPユーザーは作れないので、管理者FTPユーザーで接続します。
  4. 旧サーバ側で利用していたメールアカウントも移す場合は新サーバにも同じメールアカウントを作成することになるのですが、試用期間中は制限されているのでお金を支払い契約しないといけません。
  5. ネームサーバを変更した後の不安定な期間のために事前にメール設定を行います。ベストは旧サーバと新サーバの2つに接続できるように、1つのメールアドレスに対して2つのメールアカウントを用意することです。その際、受信サーバや送信サーバの設定は「IPアドレス」や「xxxx.xsrv.jp」のように、ドメインではない接続先にすることで、取り逃しを防ぐことができます。ネームサーバが完全に切り替わったら旧サーバ用のアカウントを消す流れになると思いますが、それが面倒ならwebメールを使ってもらう手もあります。こうゆうとき転送専用になっていたら設定してもらう必要はないので楽ですね。
  6. 準備が出来たタイミングでネームサーバを切り替え、旧サーバとはおさらばとなります。気を付けたいのはラピッドサイトは事前に解約手続きをしないと更新されてしまうので、忘れないようにしないといけません。

まとめ

今回ラピッドサイトからエックスサーバに乗り換えましたが今のところ快適に使っています。また新しいのが出て来たらそちらに移転するかもしれませんが、不満は全くない状態なので当分はこのままでないかと思います。
All in Oneを解除してhead周りを編集するために記事を一通り修正したため、更新日が全て本日付になってしまいました。と、実はこれを言いたかっただけだったり。

]]>
https://tetch1987.com/shittakabull/web/%e3%83%a9%e3%83%94%e3%83%83%e3%83%89%e3%82%b5%e3%82%a4%e3%83%88%e3%81%8b%e3%82%89%e3%82%a8%e3%83%83%e3%82%af%e3%82%b9%e3%82%b5%e3%83%bc%e3%83%90%e3%83%bc%e3%81%b8%e3%81%ae%e3%82%b5%e3%83%bc%e3%83%90/feed/ 0
ラピッドサイトVPS-JP:サブホストの導入 https://tetch1987.com/shittakabull/web/rapid-vps-jp-subhost/ https://tetch1987.com/shittakabull/web/rapid-vps-jp-subhost/#respond Fri, 11 Apr 2014 04:38:59 +0000 http://tetch1987.com/shittakabull/?p=354 マルチドメインが対応しているラピッドサイトのVPS-jpシリーズではサブホストを利用できる。ラピッドサイトは電話のサポートがなかなかいいので利用しているのですが、サブホストのマニュアルなどもあるのでそちらを見てもらったほうが早いかもしれません。
参考URL:http://www.rapidsite.jp/support/manual/vps-jp_sj/c_1080.html

ここでは、個人的に流れと注意点を書こうと思います。気づいたことがあれば追記していきます。

サブホストの構築までの流れ

この項目については、上記の参考URLを参照した方が早いです。サブホストのゾーン設定に何千円か料金が発生します。
追記として、他社でドメインを設定していたり、自分でネームサーバを用意できる場合はレコードの設定を行うことにより料金は発生しません。

ドメイン管理者の追加

最初にメインの管理者アカウントでコントロールパネルからドメイン管理者を追加します。
ここで決めるアカウントは、FTP接続にも使用されます。FTPユーザーを追加することも可能なようです。
注意点として、サブホストがメインと関係ない場合は、「wwwドメインエイリアスを使用」のところにチェック。そうしなければ、http://www.subhost.com/でアクセスした際にメインドメインに飛んでしまいます。あとで変更も可能ですが。

webサーバへデータをアップロード

前項で作成したサブホストの管理者アカウントでFTP接続し、web領域へアップロードします。
この時の確認は、こちらの方法で行えるようですが、Wordpressなど利用している場合はリライト設定でうまくいかない場合があります。
そういった場合は、PCの設定によりネームサーバを無視して「このドメインはこのIPアドレスに接続する」といった記述をします。これにより、設定したPCのみドメインにより接続が可能です。
テストサーバでの確認が終わり、本番サーバでの確認時に便利かもしれません。

ゾーン設定:ラピッドサイトのネームサーバを利用する場合

サブホストのドメインで接続するために、DNSサーバーのゾーン設定を申し込みます。DNDサーバを自分で用意してゾーン設定する場合は申し込まなくてもいいようです。
お金を振り込めば、1日~2日程で完了します。

ゾーン設定:お名前.comのネームサーバを利用する場合

ドメインをお名前.com、サーバはラピッドサイトのサブホストを利用する場合、お名前.comではDNSレコードの設定ができるため、お名前.comのネームサーバを利用すれば初期費はかかりません。
以下を参考に設定しましたが、プロパゲーション期間中のためまだ確認はできていません。確認ができ次第、追加したレコードを記したいと思います。
もしこれがうまくいけば、サブドメイン時も無料で設定できると思うので、コスト削減にはなりそうです。

また、レコードについては金星についてと同じくらいの知識しかなかったため、メモとしてここに記しておきます。
以下を指定することで、設定を行う。

ホスト sample.comや、ftp.sample.comなどのホスト名。言わば主語になる。
タイプ 動詞のようなもので、どうするかを記述。「A」はIPとして設定、「CNAME」は別名として設定するなど
TTL レコードの有効期間。60~86400
IN 「レコードのクラスを表すこの部分は インターネットで使うレコードであることを意味します」らしい。。
値 目的語のようなもので、ホスト名は何にタイプするかを設定

タイプの種類は以下。今回の場合、お名前.comではNSレコードは設定画面下のチェックボックスで指定でき、SOAの設定はこちらで固定となっている。

SOA ドメインに関する権威をもつホスト、管理者などの設定、らしい
NS ネームサーバに指定する(例:sample.com IN NS ns1.sample.com)
A IPアドレスに指定する。(例:sample.com IN A 000.00.000.000)
MX ドメイン宛のメールは届く場所を指定(例:sample.com IN MX sample.com)
CNAME 別名として指定(例:ftp.sample.com IN CNAME sample.com)

これらをもとにすると読みやすいかもしれません。「これは(ホスト名)」、「これとする(タイプ)」、「これを(値)」と言う順番です。

  • 記述)ftp.sample.com IN CNAME sample.com
    意味)「ftp.sample.com(ホスト名)」は、「sample.com(値)」を「別名(タイプ:CHAME)とする」
  • 記述)sample.com IN A 000.00.000.000
    意味)「sample.com(ホスト名)」は、「000.00.000.000(値)」を「IPとする(タイプ:A)」

注意点的なもの

ここでは構築した後などに設定に関する注意点的なものです。

メールアドレスのユーザー名

サーバ内に同じユーザー名があってはならないため、メインやサブホストで「info」などを利用する場合、ユーザー名を「info_sub」など別な名前にする必要があります。エンドユーザーを作成するさいにメールアドレスを決める箇所があるため、そこで「info@subhost.com」などと設定します。

WordPressなどでのメール送信

サブホストでWordpressを運用すると、お問合せや会員登録時などのメール送信が届かないといったことがありました。サブホストはメインサーバを経由しているため、なりすましと判断されてメールが届かないことが起こるようです。また、Gmailで閲覧すると「maindomain.com経由」とメインドメインが表示されてしまう(Gmailの経由について)。
電話サポートできいてみたところ、SPFレコードだかTXTレコードだかを修正し、このドメインはこのサーバを利用していますと宣言すればいいとかなんとか。正直この辺はよく分からないのですが、修正する必要があるようです。

]]>
https://tetch1987.com/shittakabull/web/rapid-vps-jp-subhost/feed/ 0