Hallo,
ich habe da ein Riesenproblem mit den Virtual Hosts.
Ein virtual host wird immer als standard benutzt und zeigt die document root, solange aus dem Ordner sites-available die Datei "default" aktiviert ist.
Wenn ich "default" deaktiviere zeigt die IP auf eine vorhandene andere Seite, was ja auch logisch ist.
Meine Frage ist: Wie bekomme ich es hin, dass ich bei Eingabe der IP direkt auf die document-root komme und bei jeder anderen Adresse auch in den entsprechenden Unterordner?
Die Dateien sehen aus wie folgt:
default:
---------------------------------------------------------------
NameVirtualHost *:80
<VirtualHost 188.40.141.19:80>
DocumentRoot /home/www
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /home/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride All
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
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/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>
--------------------------------------------------
Eine der vhosts (als Beispiel shop303.de):
NameVirtualHost 188.40.141.19:80
<VirtualHost shop303.de:80>
ServerName shop303.de
DocumentRoot /home/www/shop303/
ServerAlias shop303.de *.shop303.de
<Directory /home/www/shop303/>
Options -FollowSymLinks +SymLinksIfOwnerMatch
AllowOverride All
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
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/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>
-----------------------------------------------------
Bei Eingabe von apache2ctl -S
bekomme ich diese Meldungen:
[Fri Feb 26 13:08:56 2010] [warn] NameVirtualHost 188.40.141.19:80 has no VirtualHosts
[Fri Feb 26 13:08:56 2010] [warn] NameVirtualHost 188.40.141.19:80 has no VirtualHosts
[Fri Feb 26 13:08:56 2010] [warn] NameVirtualHost 188.40.141.19:80 has no VirtualHosts
[Fri Feb 26 13:08:56 2010] [warn] NameVirtualHost *:80 has no VirtualHosts
VirtualHost configuration:
188.40.141.19:80 is a NameVirtualHost
default server juliareyelt.de (/etc/apache2/sites-enabled/juliareyelt:2)
port 80 namevhost juliareyelt.de (/etc/apache2/sites-enabled/juliareyelt:2)
port 80 namevhost shop303.de (/etc/apache2/sites-enabled/shop303:2)
port 80 namevhost synthesizer-magazine.com (/etc/apache2/sites-enabled/synmag_com:2)
port 80 namevhost welle303.de (/etc/apache2/sites-enabled/welle303:2)
Syntax OK
Ich vermute, dass das Problem mit den Fehlermeldungen zusammenhängt
Kann mit bitte jemand helfen?
Danke
Chricken