Logging with Apache vhosts file

Gerry

Active Member
#1
We are trying to get Litespeed to act as our current Apache setup. We got almost everything to work as we want, however, there is one issue we can't seem to solve: logging.

We use the following files:
Code:
/etc/apache/sites.conf - VirtualHost definitions
/etc.apache/httpd.conf -  Apache main configuration, which includes the sites.conf file
If we put the following in httpd.conf, nothing happens. Litespeed does not take it into account:
Code:
LogFormat "%v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
CustomLog /var/log/lsws/access.log combined
However, if we put the "CustomLog" directive in a VirtualHost definition, then it works. Is there a way to tell Litespeed to use the same log format for ALL Apache VirtualHosts? We would like to keep the same layout for the VirtualHost definitions and to avoid adding extra lines per VirtualHost that would be the same every time anyway.

Furthermore, Litespeed does not seem to use the %v directive. This is very important to us, as we use it to split the logfiles afterwards. More information can be found here.

Is there a solution for these problems?
 

mistwang

LiteSpeed Staff
#4
OK, I see, we could make the log configuration in the main httpd.conf the default for all vhosts. Does all vhost log to the same log file in your setup?
 

Gerry

Active Member
#5
That would be great if that was possible! :)
Yes, indeed, all virtual hosts log to the same logfile. Could you also have a look at the %v directive in the LogFormat? This is also very important to us.

Thank you for your replies, by the way!
 
Top