LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-14-2013, 12:58 PM   #1
sjfast911
LQ Newbie
 
Registered: Jul 2007
Distribution: Sles
Posts: 10

Rep: Reputation: 0
Squid LogFormat ?


Hello,

I am using Squid 2.5 on Sles10sp3 and the following command works great to change the squid access log format into human readable form.

emulate_httpd_log on

We also are running Squid 2.7 on Sles11sp1 and I tried that same command in the squid.conf file and it does not seem to convert the date into human readable form like on the Sles10sp3 server. Is this because the version of squid is different or am I missing something? I made that change to the sles10sp3 servers a long time ago and might have forgotten that there is another part to this in order to get the date into human readable form but I just cannot remember what it is if indeed I did something else besides that command.

Any ideas ?

Thanks
Scott
 
Old 01-14-2013, 05:05 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,519

Rep: Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501
Hi,

The "emulate_httpd_log" is a valid squid-2.7 directive, so I guess there is something else wrong with your config. You should post squid.conf so we can take a closer look

Regards
 
Old 01-15-2013, 07:10 AM   #3
sjfast911
LQ Newbie
 
Registered: Jul 2007
Distribution: Sles
Posts: 10

Original Poster
Rep: Reputation: 0
I would think so too since it worked in squid 2.5. Here is the squid.conf. It has been trimmed down by another person no longer in our department so we might be missing something.

#
# To view config file with full factory comments, see "squid.conf.documented".

acl all src all
acl manager proto cache_object
acl localhost src 127.0.0.1/32
acl to_localhost dst 127.0.0.0/8

acl localnet src "/etc/squid/srcip.txt" # RFC1918 possible internal network
acl permittedDomains dstdomain "/etc/squid/dstdomains.txt" # RFC1918 possible internal network

acl localnet src 172.16.0.0/12 # RFC1918 possible internal network
acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
acl SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 8080 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl CONNECT method CONNECT

http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports

http_access allow localnet
http_access allow localhost

http_access deny all

icp_access allow localnet
icp_access deny all

http_port 8080

hierarchy_stoplist cgi-bin ?

emulate_httpd_log on
access_log /var/log/squid/access.log squid

refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 20% 4320

acl shoutcast rep_header X-HTTP09-First-Line ^ICY\s[0-9]
upgrade_http0.9 deny shoutcast

acl apache rep_header Server ^Apache
broken_vary_encoding allow apache

#### End conf

I tried moving the directive after access_log directive but got the same results. The conf files on my Slesp10sp3 servers are full/default conf file just edit accordingly for our needs but it has all of the comments and other directives that are either remmed out or are active. Very long and cumbersome but it must have everything that is needed.

Do you see or not see anything?

Scott
 
Old 01-15-2013, 09:24 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,519

Rep: Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501
Hi,
Quote:
...
emulate_httpd_log on
access_log /var/log/squid/access.log squid
...
You need to remove the keyword "squid" from the end of the access_log directive, so the above becomes:
Code:
...
emulate_httpd_log on
access_log /var/log/squid/access.log
...
Regards
 
Old 01-16-2013, 07:20 AM   #5
sjfast911
LQ Newbie
 
Registered: Jul 2007
Distribution: Sles
Posts: 10

Original Poster
Rep: Reputation: 0
That was it. Did not see that. Thanks

Scott.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Apache Access LogFormat related question saagar Linux - Newbie 10 07-07-2011 02:52 PM
Squid Redirect specific domain to an Secondary (External) Squid Proxy Zxarr Linux - Server 2 04-20-2010 01:50 PM
squid conf: squid failed when I type insert redirect_program /usr/bin/squidguard laxmantsharma Linux - Software 1 02-24-2009 07:02 AM
Calamaris would not generate reports if I change logformat. linuxlover.chaitanya Linux - Software 4 02-09-2009 08:00 AM
squid conf: squid failed when I type insert redirect_program /usr/bin/squidguard Niceman2005 Linux - Software 1 11-24-2004 03:29 PM


All times are GMT -5. The time now is 10:13 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration