Хочу настроить вывод логов, что бы выводился и Referer и User-Agent.
Причем что бы делалось это и для VirtualHost
читать дальше »
Код:
Сейчас секция VirtualHost выглядит так:
<VirtualHost *:80>
ServerAdmin my@mail.
DocumentRoot "F:/www/sites/site.ru"
ServerName site.ru
ServerAlias www.site.ru
ErrorLog "F:/www/logs/site.ru-error.log"
CustomLog "f:/www/logs/site.ru-access.log" common
</VirtualHost>
Вот секция с httpd.conf
Код:
<IfModule log_config_module>
#
# The following directives define some format nicknames for use with
# a CustomLog directive (see below).
#
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
<IfModule logio_module>
# You need to enable mod_logio.c to use %I and %O
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
</IfModule>
#
# The location and format of the access logfile (Common Logfile Format).
# If you do not define any access logfiles within a <VirtualHost>
# container, they will be logged here. Contrariwise, if you *do*
# define per-<VirtualHost> access logfiles, transactions will be
# logged therein and *not* in this file.
#
CustomLog "f:/www/logs/access.log" common
#
# If you prefer a logfile with access, agent, and referer information
# (Combined Logfile Format) you can use the following directive.
#
CustomLog "logs/access.log" combined
</IfModule>
UPDATE: Тупил... с выводом логов разобрался
всего то нудно было сделать в виртуалхост
CustomLog "f:/www/logs/site.ru-access.log" combined
Так же хотелось бы настроить логи так, что за каждый день создавался бы отдельный лог-файл.
читать дальше »
Правильно ли понимаю, что для ротации логов апача под виндой нужно:
1) остановить службу апача
2) перенести старые логи
3) запустить службу апача
???
UPDATE: И снова тупил
в виртуалхост прописал
CustomLog "|bin/rotatelogs.exe f:/www/logs/site.ru-access-%Y-%m-%d.log 86400" combined
Мля... ну почему я несколько дней нифига не мог найти информацию, а тут, после того как создал тему, за пару часов всё отыскал и настроил???