CustomLog dynamisch

Alles, was den Apache betrifft, kann hier besprochen werden.

CustomLog dynamisch

Postby rpretory » 12. September 2006 11:58

Hallo,

gibt es eine Möglichkeit CustomLogs dynamisch zu erstellen?

jetzt sieht meine config per server so aus:

<VirtualHost 10.0.0.2>
ServerName www.xy.com
DocumentRoot /data/www/xy/html
ScriptAlias /cgi-bin/ /data/www/xy/cgi-bin/
LogFormat "combined"
CustomLog /data/statistik/www.xy.com "combined"
ServerAdmin webmaster@xy.com

</VirtualHost>

ich würde gern
LogFormat "combined"
CustomLog /data/statistik/www.xy.com "combined"
ServerAdmin webmaster@xy.com

in extras/log.conf auslagern

und per Include extras/log.conf dann einbinden.

nur welche variable muß ich für xy.com setzen?

HG
Roman
rpretory
 
Posts: 2
Joined: 12. September 2006 11:27

Postby deepsurfer » 12. September 2006 12:20

CustomLog /data/statistik/www.xy.com "combined"

Das definiert die Textdatei, also ist www.xy.com eine Text datei die du auswerten kannst.
Die Pfadanweisung davor ist wie der Name schon sagt eine Pfadanweisung.

CustomLog /pfad/wohin/ich/will/extras/log.conf "combined"

Du kannst auch eine eigene Regelstellung definieren, schau dazu mal in die httpd.conf, darin sind zwei Regelwerke definiert (common und combined), aus den möglichkeiten kannst du auch ein weiteres logformat erstellen mit eigenem namen.

http://httpd.apache.org/docs/2.2/logs.html
chirio Deep
Wie sagte einst der MCP aus Tron auf dem Bildschirm zu schreiben Pflegte
" ... end of communication ... "
User avatar
deepsurfer
AF Moderator
 
Posts: 6440
Joined: 23. November 2004 10:44
Location: Cologne
Operating System: Win-XP / Win7 / Linux -Debian

Postby rpretory » 14. September 2006 17:21

danke

dachte es geht auch einfacher!
rpretory
 
Posts: 2
Joined: 12. September 2006 11:27


Return to Apache

Who is online

Users browsing this forum: No registered users and 280 guests