[solved] litespeed access log not working

#1
i use aws ec2 and install the litespeed.
i set litespeed to use apache's httpd.conf.
here is the httpd.conf setting:
CustomLog /etc/httpd/logs/xxx.com combined
CustomLog /etc/httpd/logs/xxx.com-bytes_log "%{%s}t %I .\n%{%s}t %O ."

But the log is not changing.

Can anyone help me?


thanks
 
Last edited by a moderator:
#3
the access logs file is created automatically by lsws, but it is empty.


tail -f /etc/httpd/logs/xxx.com

==> empty here <====



tail -f /usr/local/lsws/logs/error_log

2011-07-30 16:05:29.024 [INFO] [125.162.147.183:27488-0#APVH_xxx.yyy.co.id] File not found [/home/xxxs/public_html/images/xxx/Lea_Blazer_Black.jpg]
2011-07-30 16:05:33.624 [INFO] [125.162.147.183:27498-0#APVH_xxx.yyy.co.id] File not found [/home/xxxs/public_html/images/xxx/Lea_Blazer_Black.jpg]
2011-07-30 16:05:36.787 [INFO] [223.255.229.11:34717-4#APVH_xxx.yyy.co.id] File not found [/home/xxxs/public_html/themes/simpleBox/css/images/selected-item.gif]
2011-07-30 16:05:37.023 [INFO] [182.2.251.55:62930-0#APVH_xxx.yyy.co.id] File not found [/home/xxxs/public_html/images/zoomloader.gif]






tail -f /usr/local/lsws/logs/access.log

==> empty here <====
 
#6
i already changed file permission to 777 to all logs in /etc/httpd/logs/
then restarted the lsws, and nothing happen


here is the result when i type ls -al command:
-rwxrwxrwx 1 apache apache 0 Jul 30 12:41 xxx.com
-rwxrwxrwx 1 apache apache 0 Jul 30 12:41 xxx.com-bytes_log
 

NiteWave

Administrator
#7
Code:
BTW, i was using apache before migrating to litespeed,
and the access log was working when using apache.
what user apache run as ?
and what litespeed run as? they should match.
if not, re-install litespeed again, to specify same user as apache.
 
#8
what user apache run as ?
and what litespeed run as? they should match.
if not, re-install litespeed again, to specify same user as apache.
apache run as apache:apache
and the litespeed also apache:apache, i set it



when installing litespeed:

As you are the root user, you must choose the user and group
whom the web server will be running as. For security reason, you should choose
a non-system user who does not have login shell and home directory such as
'nobody'.

User [nobody]: =====> i typed apache <=====




Please choose the group that the web server running as.

User 'nobody' is the member of following group(s): nobody
Group [nobody]: =======> i typed apache <======
 
#9
FYI, everytime i restart the lsws,
the error log show the following error:

tail -f /etc/httpd/logs/error_log
2011-07-30 16:45:55.682 [ERROR] [/etc/httpd/conf/httpd.conf:1071] Listener for _default_ is not available!
 
#11
then, is litespeed running ?

#netstat -ntlp

sure, litespeed is running now.


=====================

> netstat -ntlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 896/sendmail: accep
tcp 0 0 0.0.0.0:7080 0.0.0.0:* LISTEN 14205/litespeed (ls
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 14205/litespeed (ls
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN 881/vsftpd
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 864/sshd
tcp 0 0 :::22 :::* LISTEN 864/sshd

=========

> top

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
14483 apache 20 0 151m 15m 11m S 5.7 2.6 0:20.79 lsphp5
14398 apache 20 0 203m 68m 13m S 1.7 11.4 1:44.15 lsphp5




i could access the litespeed admin console http://....com:7080/



i have 3 another servers that use litespeed for more than 1 year, and never have access_log problem like this before.
 
#13
maybe disk full?
#df -h
#df -hi
all disks are not full

# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/xvda1 7.9G 5.3G 2.6G 68% /
tmpfs 302M 44K 302M 1% /dev/shm
/dev/xvdp 15G 5.5G 9.5G 37% /prod

# df -hi
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/xvda1 512K 151K 362K 30% /
tmpfs 76K 434 75K 1% /dev/shm
/dev/xvdp 15M 105K 15M 1% /prod
 
#19
Thanks.

it's parent directory's permission issue, fixed by:
/var/log>ls -l |grep httpd
drwx------ 2 root root 4096 Jul 30 12:41 httpd
/var/log>chmod a+x httpd
/var/log>ls -l |grep httpd
drwx--x--x 2 root root 4096 Jul 30 12:41 httpd
 
Top