Ich betreibe mit 2 Freunden zusammen einen V-Server (Debian 7, apache2 als Webserver).
Nun möchte ich, das man das Home-Directory als www-Verzeichnis nutzen kann und automatisch ein VirtualHost erstellt wird für jeden Unterordner pro Home-Directory.
Als Beispiel:
/home/max/test/html/
URL zum Aufrufen dann: test.max.url.de
Dazu habe ich die apache2.conf folgendermaßen bearbeiten:
- Code: Select all
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
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 ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
<VirtualHost *:80>
UseCanonicalName Off
ServerName max.url.de
VirtualDocumentRoot /home/%-5
<Directory /home/*/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80>
UseCanonicalName Off
ServerName url.de
ServerAlias *.url.de
VirtualDocumentRoot /home/%-5/%-6/html
</VirtualHost>
Fehlermeldungen bekomme ich keine, vhost_alias_module ist auch eingebunden, rufe ich nun jedoch meine Hauptseite auf, bekomme ich als Fehlermeldung:
- Code: Select all
Not Found
The requested URL / was not found on this server.
Apache/2.2.22 (Debian) Server at code-masters.org Port 80
im Apache-Error-Log taucht mehrmals diese Meldung auf:
- Code: Select all
[client meineIP] File does not exist: /home/_
IP's und URL's habe ich jetzt natürlich ausgetauscht.
Hoffe mir kann da jemand helfen!
Vielen lieben Dank und guten Start in die Woche!