You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users-de@httpd.apache.org by Thomas Boernert <tb...@tbits.net> on 2003/07/05 14:40:55 UTC
mod_alias und mod_rewrite - ein Verzeichnis von allen Virthosts
redirecten
Hallo zusammen,
ich will folgendes machen, als Beispiel
Ich habe bei allen Virthosts ein virtuelles Verzeichnis,
z.B. /logs dieses Verzeichnis soll nicht direct im Root
des Virtweb liegen sondern woanders auf der Platte.
Ich will das aber nicht jedesmal bei jedem Virthost
ausdefinieren, sondern global machen. d.h. für
jeden Virthost sein eigenes Verzeichnis wo anders
auf der Platte.
Also ich mache folgende Konfig:
RewriteMap lowercase int:tolower
Alias /logs /var/www/logs
<Directory /var/www/logs>
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
RewriteEngine On
RewriteBase /var/www/logs
RewriteRule ^(.*)$ /var/www/logs/${lowercase:%{SERVER_NAME}}/$1
</Directory>
RewriteLog /var/log/httpd/rewrite.log
RewriteLogLevel 9
Aber irgendwie geht das nicht, im rewrite log steht folgendes
drin, was gar nicht schlecht aussieht .... aber es geht nicht
195.243.63.218 - - [05/Jul/2003:02:11:08 +0200]
[www.bits.net/sid#8139270][rid#9a19530/initial] (3) [per-dir
/var/www/logs/] strip per-dir prefix: /var/www/logs/index.html ->
index.html
195.243.63.218 - - [05/Jul/2003:02:11:08 +0200]
[www.bits.net/sid#8139270][rid#9a19530/initial] (3) [per-dir
/var/www/logs/] applying pattern '^(.*)$' to uri 'index.html'
195.243.63.218 - - [05/Jul/2003:02:11:08 +0200]
[www.bits.net/sid#8139270][rid#9a19530/initial] (5) map lookup OK:
map=lowercase key=www.bits.net -> val=www.bits.net
195.243.63.218 - - [05/Jul/2003:02:11:08 +0200]
[www.bits.net/sid#8139270][rid#9a19530/initial] (2) [per-dir
/var/www/logs/] rewrite index.html ->
/var/www/logs/www.bits.net/index.html
195.243.63.218 - - [05/Jul/2003:02:11:08 +0200]
[www.bits.net/sid#8139270][rid#9a19530/initial] (2) forcing
'/var/www/logs/www.bits.net/index.html' to get passed through to next
API URI-to-filename handler
195.243.63.218 - - [05/Jul/2003:02:11:08 +0200]
[www.bits.net/sid#8139270][rid#9a19530/initial] (2) [per-dir
/var/www/logs/] trying to replace prefix /var/www/logs/ with
/var/www/logs
195.243.63.218 - - [05/Jul/2003:02:11:08 +0200]
[www.bits.net/sid#8139270][rid#9a19530/initial] (5) strip matching
prefix: /var/www/logs/www.bits.net/index.html -> www.bits.net/index.html
195.243.63.218 - - [05/Jul/2003:02:11:08 +0200]
[www.bits.net/sid#8139270][rid#9a19530/initial] (4) add subst prefix:
www.bits.net/index.html -> /var/www/logs/www.bits.net/index.html
195.243.63.218 - - [05/Jul/2003:02:11:08 +0200]
[www.bits.net/sid#8139270][rid#9a19530/initial] (1) [per-dir
/var/www/logs/] internal redirect with
/var/www/logs/www.bits.net/index.html [INTERNAL REDIRECT]
das error.log sagt:
[Sat Jul 05 02:11:08 2003] [error] [client 195.243.63.218] File does not
exist: /var/www/webfarm/www.bits.net/var
Hat jemand eine Idee ???
Danke
Gruß Thomas
--------------------------------------------------------------------------
Apache HTTP Server Mailing List "users-de"
unsubscribe-Anfragen an users-de-unsubscribe@httpd.apache.org
sonstige Anfragen an users-de-help@httpd.apache.org
--------------------------------------------------------------------------