<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>内向けDNS | ウダ2Blog</title>
	<atom:link href="https://uda2.com/blog/tag/%e5%86%85%e5%90%91%e3%81%91dns/feed/" rel="self" type="application/rss+xml" />
	<link>https://uda2.com/blog</link>
	<description>大阪でフリーランスとしてWEB制作している管理人が気になった技術をメモったり、作ったツールの紹介などを綴っているブログです。</description>
	<lastBuildDate>Sat, 10 Jan 2009 16:51:55 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9</generator>
	<item>
		<title>DNRH-001にVINE サブドメイン</title>
		<link>https://uda2.com/blog/dnrh001vine_1/</link>
					<comments>https://uda2.com/blog/dnrh001vine_1/#respond</comments>
		
		<dc:creator><![CDATA[uda2]]></dc:creator>
		<pubDate>Sat, 10 Jan 2009 16:51:55 +0000</pubDate>
				<category><![CDATA[制作日記]]></category>
		<category><![CDATA[DNRH-001]]></category>
		<category><![CDATA[内向けDNS]]></category>
		<guid isPermaLink="false">http://uda2.com/wordpress/2009/01/dnrh001vine_1.html</guid>

					<description><![CDATA[<p>最近放置気味だったDNRH-001をテスト用にサブドメインを使える様にした。 元々ユーザーごとにアクセス出来るようにしてたので http://192.168.0.5/~myrelease/ ※ローカルの話なのでアクセスし</p>
The post <a href="https://uda2.com/blog/dnrh001vine_1/">DNRH-001にVINE サブドメイン</a> first appeared on <a href="https://uda2.com/blog">ウダ2Blog</a>.]]></description>
										<content:encoded><![CDATA[<p>最近放置気味だったDNRH-001をテスト用にサブドメインを使える様にした。<br />
元々ユーザーごとにアクセス出来るようにしてたので<br />
<strong>http://192.168.0.5/~myrelease/</strong><br />
※ローカルの話なのでアクセスしても見れませんよ。<br />
でも見れるんだけどルートからの相対パス（「/」で始まるパス）を見れるようにしたい。</p>
<p>まずは、サブドメインというだけあってドメインを指定しないと話にならないのでdns（内部DNS）の設定。<br />
クライアントパソコン（閲覧するパソコン）が1台しか無い場合hosts（C:\WINDOWS\system32\drivers\etc\hosts）に追記するだけでいいんだけどパソコンが複数ありそれぞれのパソコンのhostsを弄るのが面倒なので・・・<br />
「<a href="http://www.miloweb.net/bind.html" target="_blank">Linux で自宅サーバ</a>」を参考にBIND DNSを設定した。</p>
<p>linux.uda2.net : 192.168.0.5　（テストサーバーDNRH-001）<br />
pcast.uda2.net : 192.168.0.21　（メディアサーバーやNASとして使ってる）</p>
<p>Webminで「BIND DNS」の「Edit Config File」で「named.conf」に</p>
<pre><code>zone "uda2.net" IN {
type master;
file "uda2.net";
allow-update { none; };
};
zone "0.168.192.in-addr.arpa" IN {
type master;
file "0.168.192.in-addr.arpa";
allow-update { none; };
};</code></pre>
<p>を追加し、保存すると「既存の DNS ゾーン」に「uda2.net」が発生してるのでコレを編集、</p>
<pre><code>$TTL    1D
@       IN      SOA     linux.uda2.net.      root.linux.uda2.net. (
2003072501
3H
1H
1W
1D )
IN      NS      linux.uda2.net.
IN      MX 10   linux.uda2.net.
linux   	IN      A       192.168.0.5
uda2.net	IN      A       192.168.0.5
pcast   	IN      A       192.168.0.21
dns     	IN      CNAME   linux
www     	IN      CNAME   linux
myrelease    	IN      CNAME   linux
smtp    	IN      CNAME   linux
pop     	IN      CNAME   linux
ftp     	IN      CNAME   linux</code></pre>
<p>メールとかftpはいらんけど一応載せておいた。</p>
<p>次は逆引き「192.168.0」 を編集、</p>
<pre><code>$TTL    1D
@       IN      SOA     linux.uda2.net.      root.linux.uda2.net. (
2003072501
3H
1H
1W
1D )
IN      NS      linux.uda2.net.
IN      PTR     uda2.net.
IN      A       255.255.255.0
5       	IN      PTR     linux.uda2.net.
21       	IN      PTR     pcast.uda2.net.</code></pre>
</p>
<p>Apacheの設定は「<a href="http://vine.1-max.net/apache-u.html" target="_blank">Vine Linuxで自宅サーバー</a>」を参考に<br />
httpd.conf を編集</p>
<pre><code>NameVirtualHost *:80
&lt;VirtualHost *:80&gt;
DocumentRoot /home/httpd/html
ServerName www.uda2.net
&lt;/VirtualHost&gt;
&lt;VirtualHost *:80&gt;
DocumentRoot /home/myrelease/public_html
ServerName myrelease.uda2.net
&lt;/VirtualHost&gt;</code></pre>
</p>
<p>それから、パソコン（クライアント）のDNS設定を<br />
優先DNS　192.168.0.5<br />
代替DNS　192.168.0.1<br />
に変更したら<br />
<strong>http://myrelease.uda2.net/</strong><br />
でテストサーバーに繋がる様になった。</p>The post <a href="https://uda2.com/blog/dnrh001vine_1/">DNRH-001にVINE サブドメイン</a> first appeared on <a href="https://uda2.com/blog">ウダ2Blog</a>.]]></content:encoded>
					
					<wfw:commentRss>https://uda2.com/blog/dnrh001vine_1/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
