<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Subdomain unter Apache einrichten - Probleme]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich möchte eine Subdomain einrichten, welche unter Apache erreichbar sein soll. Momentan ist der Apache wohl auf Wildcard-Subdomains konfiguriert, weswegen jede Subdomain auf Port 80 weiterleitet und mir die normale Homepage anzeigt. Ich möchte jedoch für eine bestimmte Subdomain einen eigenen <code>DocumentRoot</code> anlegen.</p>
<p>Die Konfigurationsdatei sieht bis jetzt so aus:</p>
<pre><code># Nachfolgende Angaben sind außerhalb von &lt;VirtualHost&gt; etc...
ServerName http://www.example.com
...
DocumentRoot &quot;C:/Program Files (x86)/Apache Software Foundation/Apache2.2/htdocs&quot;

&lt;VirtualHost www.example.com:443&gt; 
SSLEngine On
SSLCertificateFile conf/ssl/example.cert
SSLCertificateKeyFile conf/ssl/example.key
DocumentRoot &quot;C:/Program Files (x86)/Apache Software Foundation/Apache2.2/htdocs&quot;
&lt;/VirtualHost&gt; 

&lt;VirtualHost meinesubdomain.example.com:80&gt; 
ServerName meinesubdomain.localhost
DocumentRoot &quot;C:/Program Files (x86)/Apache Software Foundation/Apache2.2/htdocs/subdomainverzeichnis&quot;
&lt;/VirtualHost&gt;
</code></pre>
<p>Beim Aufruf von <code>meinesubdomain.example.com</code> wird korrekterweise das angegebene Subdomain-Verzeichnis als <code>DocumentRoot</code> angesurft. Anfragen auf meine normale Domain, ohne Subdomainangabe führen jedoch ebenfalls zum Verzeichnis der Subdomain. Anfragen über HTTPS führen dann korrekterweise wieder auf die normale Webseite.</p>
<p>Was ist da falsch?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/230963/subdomain-unter-apache-einrichten-probleme</link><generator>RSS for Node</generator><lastBuildDate>Fri, 10 Apr 2026 11:11:05 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/230963.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 04 Jan 2009 18:04:11 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Subdomain unter Apache einrichten - Probleme on Sun, 04 Jan 2009 18:04:11 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich möchte eine Subdomain einrichten, welche unter Apache erreichbar sein soll. Momentan ist der Apache wohl auf Wildcard-Subdomains konfiguriert, weswegen jede Subdomain auf Port 80 weiterleitet und mir die normale Homepage anzeigt. Ich möchte jedoch für eine bestimmte Subdomain einen eigenen <code>DocumentRoot</code> anlegen.</p>
<p>Die Konfigurationsdatei sieht bis jetzt so aus:</p>
<pre><code># Nachfolgende Angaben sind außerhalb von &lt;VirtualHost&gt; etc...
ServerName http://www.example.com
...
DocumentRoot &quot;C:/Program Files (x86)/Apache Software Foundation/Apache2.2/htdocs&quot;

&lt;VirtualHost www.example.com:443&gt; 
SSLEngine On
SSLCertificateFile conf/ssl/example.cert
SSLCertificateKeyFile conf/ssl/example.key
DocumentRoot &quot;C:/Program Files (x86)/Apache Software Foundation/Apache2.2/htdocs&quot;
&lt;/VirtualHost&gt; 

&lt;VirtualHost meinesubdomain.example.com:80&gt; 
ServerName meinesubdomain.localhost
DocumentRoot &quot;C:/Program Files (x86)/Apache Software Foundation/Apache2.2/htdocs/subdomainverzeichnis&quot;
&lt;/VirtualHost&gt;
</code></pre>
<p>Beim Aufruf von <code>meinesubdomain.example.com</code> wird korrekterweise das angegebene Subdomain-Verzeichnis als <code>DocumentRoot</code> angesurft. Anfragen auf meine normale Domain, ohne Subdomainangabe führen jedoch ebenfalls zum Verzeichnis der Subdomain. Anfragen über HTTPS führen dann korrekterweise wieder auf die normale Webseite.</p>
<p>Was ist da falsch?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1639413</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1639413</guid><dc:creator><![CDATA[mikey]]></dc:creator><pubDate>Sun, 04 Jan 2009 18:04:11 GMT</pubDate></item><item><title><![CDATA[Reply to Subdomain unter Apache einrichten - Probleme on Wed, 07 Jan 2009 18:18:33 GMT]]></title><description><![CDATA[<p>Keiner 'ne Ahnung?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1641299</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1641299</guid><dc:creator><![CDATA[mikey]]></dc:creator><pubDate>Wed, 07 Jan 2009 18:18:33 GMT</pubDate></item><item><title><![CDATA[Reply to Subdomain unter Apache einrichten - Probleme on Wed, 07 Jan 2009 18:48:59 GMT]]></title><description><![CDATA[<p>kanns grad nicht testen, aber ich glaub du musst für <a href="http://www.example.com" rel="nofollow">www.example.com</a> nen eigenen vhost aufsetzen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1641322</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1641322</guid><dc:creator><![CDATA[sioux]]></dc:creator><pubDate>Wed, 07 Jan 2009 18:48:59 GMT</pubDate></item><item><title><![CDATA[Reply to Subdomain unter Apache einrichten - Probleme on Wed, 07 Jan 2009 20:43:17 GMT]]></title><description><![CDATA[<p>Okay, vielen Dank soweit schon mal. Ich werde es morgen ausprobieren und dann berichten...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1641398</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1641398</guid><dc:creator><![CDATA[mikey]]></dc:creator><pubDate>Wed, 07 Jan 2009 20:43:17 GMT</pubDate></item><item><title><![CDATA[Reply to Subdomain unter Apache einrichten - Probleme on Wed, 07 Jan 2009 22:25:26 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>pass auf, wenn du vHosts anlegst: Der erste geparste vHost ist der Default. Wenn du also eine eigene Config pro vHost hast (wie z.B. unter Debian mit sites-available/enabled), nenn sie am besten aaa-name.</p>
<p>Viele Grüße<br />
Christian</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1641436</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1641436</guid><dc:creator><![CDATA[ChrisM]]></dc:creator><pubDate>Wed, 07 Jan 2009 22:25:26 GMT</pubDate></item><item><title><![CDATA[Reply to Subdomain unter Apache einrichten - Probleme on Thu, 08 Jan 2009 15:46:46 GMT]]></title><description><![CDATA[<p>Okay, danke... die Konfiguration sieht jetzt folgendermaßen aus:</p>
<pre><code>&lt;VirtualHost www.example.com:80&gt; 
ServerName www.example.com
DocumentRoot &quot;C:/Program Files (x86)/Apache Software Foundation/Apache2.2/htdocs&quot;
&lt;/VirtualHost&gt;

&lt;VirtualHost conf.example.com:80&gt; 
ServerName conf.example.com
DocumentRoot &quot;C:/Program Files (x86)/Apache Software Foundation/Apache2.2/htdocs/subdomainverzeichnis&quot;
&lt;/VirtualHost&gt; 

&lt;VirtualHost www.example.com:443&gt; 
SSLEngine On
SSLCertificateFile conf/ssl/example.cert
SSLCertificateKeyFile conf/ssl/example.key
DocumentRoot &quot;C:/Program Files (x86)/Apache Software Foundation/Apache2.2/htdocs&quot;
&lt;/VirtualHost&gt;
</code></pre>
<p>Jedoch bringt der Apache beim Start folgenden Hinweis:</p>
<p>Apache Webserver schrieb:</p>
<blockquote>
<p>VirtualHost <a href="http://www.example.com:80" rel="nofollow">www.example.com:80</a> overlaps with VirtualHost <a href="http://conf.example.com:80" rel="nofollow">conf.example.com:80</a>, the first has precedence, perhaps you need a NameVirtualHost directive.</p>
</blockquote>
<p>Gut okay, dadurch, dass der erste VirtualHost Vorrang hat, wird auch korrekterweise beim Aufruf von <a href="http://www.example.com" rel="nofollow">www.example.com</a> die Webseite angezeigt, jedoch auch bei <a href="http://conf.example.com" rel="nofollow">conf.example.com</a>. Nie wird auf das Subdomainverzeichnis geleitet.</p>
<p>Ich habe es auch schon mit &quot;localhost&quot; bzw. &quot;conf.localhost&quot; als Angabe versucht, das macht es alles aber auch nicht besser. Und die Direktive <code>NameVirtualHost</code> existiert nicht (neueste Apache-Version.)</p>
<p>Hat noch jemand einen Tipp?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1641867</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1641867</guid><dc:creator><![CDATA[mikey]]></dc:creator><pubDate>Thu, 08 Jan 2009 15:46:46 GMT</pubDate></item><item><title><![CDATA[Reply to Subdomain unter Apache einrichten - Probleme on Thu, 08 Jan 2009 17:50:34 GMT]]></title><description><![CDATA[<blockquote>
<p>perhaps you need a NameVirtualHost directive.</p>
</blockquote>
]]></description><link>https://www.c-plusplus.net/forum/post/1641968</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1641968</guid><dc:creator><![CDATA[tippgeber]]></dc:creator><pubDate>Thu, 08 Jan 2009 17:50:34 GMT</pubDate></item><item><title><![CDATA[Reply to Subdomain unter Apache einrichten - Probleme on Fri, 09 Jan 2009 16:02:19 GMT]]></title><description><![CDATA[<p>Argh, ich hätte vorher besser schauen sollen, <code>&lt;NameVirtualHost&gt;</code> gibt es nicht, das heißt <code>NameVirtualHost</code> als Argument... jetzt funktioniert es, vielen Dank. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f921.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--clown_face"
      title=":clown:"
      alt="🤡"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1642521</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1642521</guid><dc:creator><![CDATA[mikey]]></dc:creator><pubDate>Fri, 09 Jan 2009 16:02:19 GMT</pubDate></item></channel></rss>