Page 1 of 1

dyndns subdomins mit Apache2

Posted: 2006-05-06 12:40
by blnsnoopy26
Hi,

Ich weiss wie man Apache2 konfiguriert, aber nun habe ich mir mal via vmware mir @home mir ein SuSE 9.3 Server aufgesetzt.

Apache2 läuft und Seite wird angeziegt, aber es gibt ein kleines Problem und zwar will er keine Subdomains annehmen - egal wie ich es versuche :(

Und zwar habe ich das so angelegt (vhost 1):

Code: Select all

<Directory "/home">
  Options -FollowSymLinks -SymLinksIfOwnerMatch
  DirectoryIndex index.html index.htm index.php index.php3 index.php4
  <IfModule mod_access.c>
    Allow from all
  </IfModule>
  <Files ~ ".shtml$">
    allow from all
  </Files>
  <Files ~ ".(wml.*|wbmp)$">
    allow from all
  </Files>
</Directory>

<VirtualHost 192.168.178.24:80>
  ServerName 192.168.178.24
  ServerAlias heaven.dyndns.info

  DocumentRoot /home/heaven/public_html/
  SuexecUserGroup heaven users
  ScriptAlias /cgi-bin/ /home/heaven/public_html/cgi-bin/
  php_admin_value open_basedir /home/heaven/public_html/
  php_admin_value file_uploads 1
  php_admin_value upload_tmp_dir /home/heaven/phptmp/
</VirtualHost>
Lege ich nun aber noch eine Subdomain an:

Code: Select all

<VirtualHost 192.168.178.24:80>
  ServerName 192.168.178.24
  ServerAlias forum.heaven.dyndns.info

  DocumentRoot /home/heaven/public_html/forum
  SuexecUserGroup heaven users
  ScriptAlias /cgi-bin/ /home/heaven/public_html/cgi-bin/
  php_admin_value open_basedir /home/heaven/public_html/
  php_admin_value file_uploads 1
  php_admin_value upload_tmp_dir /home/heaven/phptmp/
</VirtualHost>
Wenn ich aber die Forumsurl aufrufe komme ich immer und immer wieder zum ersten vhost. Kann mir jemand helfen, damit ich die Subdomain zum laufen bekomme??

muss ich das noch in der /etc/hosts bekannt geben z.b als

192.168.178.24 forum.local
192.168.178.24 test.local

...etc?

Will später dann mein rooti spiegeln und dann auch diverse urls über subdomains erreichen können.

Habe es auch schon mit NameVirtualhost versucht aber blieb ohne Erfolg.

Hat jemand ne Iddee?
Local läuft Linux suse 9.3 mit Apache2

Re: dyndns subdomins mit Apache2

Posted: 2006-05-06 13:14
by Roger Wilco
Wo ist deine NameVirtualHost-Direktive? Seit wann übergibt man der ServerName-Direktive IP-Literale?
Und seit wann unterstützt DynDNS (Wildcard-) Subdomains?

Fragen über Fragen, deren Antwort du dir nach Überfliegen des Apache-Manuals ohne Weiteres selbst geben kannst.

Re: dyndns subdomins mit Apache2

Posted: 2006-05-06 14:08
by Joe User
Zudem muss jeder vHost einen individuellen "ServerName fqdn" besitzen...

Re: dyndns subdomins mit Apache2

Posted: 2006-05-06 14:38
by blnsnoopy26
Hi,

So habe jetzt nochmal bischen Doku gelesen und abgeglichen und par veränderungen an meinem vhost gemacht und nun funktionieren auch die Subdomains ohne probleme :)

wenn ich forum.dyndns aufrufe komme ich auch ins forum und wenn ich das forum weglasse, dann komme ich ins andere verzeichnis.

So ist es jetzt bei mir konfoguriert und funzt prima:

Code: Select all

NameVirtualHost *

<Directory "/home/heaven/public_html/forum">
  Options -FollowSymLinks -SymLinksIfOwnerMatch
  DirectoryIndex index.html index.htm index.php index.php3 index.php4
  <IfModule mod_access.c>
    Allow from all
  </IfModule>
  <Files ~ ".shtml$">
    allow from all
 </Files>
  <Files ~ ".(wml.*|wbmp)$">
    allow from all
  </Files>
</Directory>

<Directory "/home/heaven/public_html/test">
  Options -FollowSymLinks -SymLinksIfOwnerMatch
  DirectoryIndex index.html index.htm index.php index.php3 index.php4
  <IfModule mod_access.c>
    Allow from all
  </IfModule>
  <Files ~ ".shtml$">
    allow from all
 </Files>
  <Files ~ ".(wml.*|wbmp)$">
    allow from all
  </Files>
</Directory>

<Directory "/home/heaven/public_html>
  Options -FollowSymLinks -SymLinksIfOwnerMatch
  DirectoryIndex index.html index.htm index.php index.php3 index.php4
  <IfModule mod_access.c>
    Allow from all
  </IfModule>
  <Files ~ ".shtml$">
    allow from all
 </Files>
  <Files ~ ".(wml.*|wbmp)$">
    allow from all
  </Files>
</Directory>

<VirtualHost *>
  ServerName heaven.dyndns.info
  ServerAlias heaven.dyndns.info
  DocumentRoot /home/heaven/public_html/
  SuexecUserGroup heaven users
  ScriptAlias /cgi-bin/ /home/heaven/public_html/cgi-bin/
  php_admin_value open_basedir /home/heaven/public_html/
  php_admin_value file_uploads 1
  php_admin_value upload_tmp_dir /home/heaven/phptmp/
</VirtualHost>

<VirtualHost *>
  ServerName heaven.dyndns.info
  ServerAlias forum.heaven.dyndns.info
  DocumentRoot /home/heaven/public_html/forum/
  SuexecUserGroup heaven users
  ScriptAlias /cgi-bin/ /home/heaven/public_html/cgi-bin/
  php_admin_value open_basedir /home/heaven/public_html/
  php_admin_value file_uploads 1
  php_admin_value upload_tmp_dir /home/heaven/phptmp/
</VirtualHost>

<VirtualHost *>
  ServerName heaven.dyndns.info
  ServerAlias test.heaven.dyndns.info
  DocumentRoot /home/heaven/public_html/test/
  SuexecUserGroup heaven users
  ScriptAlias /cgi-bin/ /home/heaven/public_html/cgi-bin/
  php_admin_value open_basedir /home/heaven/public_html/
  php_admin_value file_uploads 1
  php_admin_value upload_tmp_dir /home/heaven/phptmp/
</VirtualHost>
Sitze da schon zich stunden dran, aber nur so eine kleinigkeit hat es ausgemacht.

Und ja wildcards gehen bei dyndns ... unter xampp bei winxp lief es auch ohne probs.

nur halte ich nichts von xampp.
So habe ich mir vmware besorgt und mir suse gesaugt und installiert.

trotzdem thx für den Ansporn :)