<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Linux Forum &mdash; Как создать сабдомен?]]></title>
		<link>https://linuxforum.ru/viewtopic.php?id=6655</link>
		<atom:link href="https://linuxforum.ru/extern.php?action=feed&amp;tid=6655&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «Как создать сабдомен?».]]></description>
		<lastBuildDate>Wed, 15 Sep 2010 13:25:34 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Как создать сабдомен?]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=92064#p92064</link>
			<description><![CDATA[<p>named.conf такие зоны содержит:</p><p>// prime the server with knowledge of the root servers<br />zone &quot;.&quot; {<br />&nbsp; &nbsp; type hint;<br />&nbsp; &nbsp; file &quot;/etc/bind/db.root&quot;;<br />};</p><p>// be authoritative for the localhost forward and reverse zones, and for<br />// broadcast zones as per RFC 1912</p><p>zone &quot;localhost&quot; {<br />&nbsp; &nbsp; type master;<br />&nbsp; &nbsp; file &quot;/etc/bind/db.local&quot;;<br />};</p><p>zone &quot;127.in-addr.arpa&quot; {<br />&nbsp; &nbsp; type master;<br />&nbsp; &nbsp; file &quot;/etc/bind/db.127&quot;;<br />};</p><p>zone &quot;0.in-addr.arpa&quot; {<br />&nbsp; &nbsp; type master;<br />&nbsp; &nbsp; file &quot;/etc/bind/db.0&quot;;<br />};</p><p>zone &quot;255.in-addr.arpa&quot; {<br />&nbsp; &nbsp; type master;<br />&nbsp; &nbsp; file &quot;/etc/bind/db.255&quot;;<br />};</p>]]></description>
			<author><![CDATA[null@example.com (nat000)]]></author>
			<pubDate>Wed, 15 Sep 2010 13:25:34 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=92064#p92064</guid>
		</item>
		<item>
			<title><![CDATA[Re: Как создать сабдомен?]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=92027#p92027</link>
			<description><![CDATA[<p>а где ее править?&nbsp; <br />поиск по имени домена&nbsp; везде, в том числе /etc/bind ничего не дает (в имени файлов и внутри файлов)</p><p>в var/lib/bind -пусто</p>]]></description>
			<author><![CDATA[null@example.com (nat000)]]></author>
			<pubDate>Wed, 15 Sep 2010 12:43:37 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=92027#p92027</guid>
		</item>
		<item>
			<title><![CDATA[Re: Как создать сабдомен?]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=92021#p92021</link>
			<description><![CDATA[<p>Зону править надо, а не localhost</p>]]></description>
			<author><![CDATA[null@example.com (zerg)]]></author>
			<pubDate>Wed, 15 Sep 2010 12:34:59 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=92021#p92021</guid>
		</item>
		<item>
			<title><![CDATA[Как создать сабдомен?]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=92018#p92018</link>
			<description><![CDATA[<p>нужна помощь коллективного разума&nbsp; smile </p><p>есть сайт , допустим site.com (www.site.com и&nbsp; site.com&nbsp; оба работают одинаково)</p><p>нужно создать сабдомен test.site.com </p><p>что было сделано:</p><p>1) в /etc/hosts добавлена запись:</p><p>было<br /></p><div class="codebox"><pre><code>127.0.0.1    localhost

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts</code></pre></div><p>стало<br /></p><div class="codebox"><pre><code>127.0.0.1    localhost
127.0.0.1    test.localhost



# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts</code></pre></div><p>2) в /etc/apache2/sites-available добавлен новый хост subdomain :</p><div class="codebox"><pre><code>&lt;VirtualHost *:80&gt;
    ServerAdmin webmaster@localhost
    
    ServerName test.site.com
    DocumentRoot /home/public_html/magento2
    &lt;Directory /&gt;
        Options FollowSymLinks
        AllowOverride All
    &lt;/Directory&gt;
    &lt;Directory /home/public_html/magento2&gt;
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all
    &lt;/Directory&gt;
    
    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    &lt;Directory &quot;/usr/lib/cgi-bin&quot;&gt;
        AllowOverride All
        Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
        Order allow,deny
        Allow from all
    &lt;/Directory&gt;

    ErrorLog /var/log/apache2/error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog /var/log/apache2/access.log combined

    Alias /doc/ &quot;/usr/share/doc/&quot;
    &lt;Directory &quot;/usr/share/doc/&quot;&gt;
        Options Indexes MultiViews FollowSymLinks
        AllowOverride All
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    &lt;/Directory&gt;

&lt;/VirtualHost&gt;</code></pre></div><br /><p>работающий default:</p><div class="codebox"><pre><code>&lt;VirtualHost *:80&gt;
    ServerAdmin webmaster@localhost
    
    
 DocumentRoot /home/public_html/magento
    &lt;Directory /&gt;
        Options FollowSymLinks
        AllowOverride All
    &lt;/Directory&gt;
    &lt;Directory /home/public_html/magento&gt;
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all
    &lt;/Directory&gt;
    
    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    &lt;Directory &quot;/usr/lib/cgi-bin&quot;&gt;
        AllowOverride All
        Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
        Order allow,deny
        Allow from all
    &lt;/Directory&gt;

    ErrorLog /var/log/apache2/error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog /var/log/apache2/access.log combined

    Alias /doc/ &quot;/usr/share/doc/&quot;
    &lt;Directory &quot;/usr/share/doc/&quot;&gt;
        Options Indexes MultiViews FollowSymLinks
        AllowOverride All
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    &lt;/Directory&gt;

&lt;/VirtualHost&gt;</code></pre></div><p>3) httpd.conf добавлено&nbsp; /home/public_html/magento2:</p><div class="codebox"><pre><code>&lt;Directory /home/public_html/magento&gt;
AllowOverride All
&lt;/Directory&gt;

&lt;Directory /home/public_html/magento2&gt;
AllowOverride All
&lt;/Directory&gt;</code></pre></div><p>4) apache stop, a2ensite subdomain, apache start&nbsp; ==&gt; OK, появилась запись в /etc/apache2/sites-enabled/</p><br /><p>при обращении к test.site.com никакой реакции, в логах в том числе&nbsp; :rolleyes:</p>]]></description>
			<author><![CDATA[null@example.com (nat000)]]></author>
			<pubDate>Wed, 15 Sep 2010 12:32:39 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=92018#p92018</guid>
		</item>
	</channel>
</rss>
