Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've got a simple script listening on port 10101 (tcp) on my primary server which is meant to consume the log files of my proxy (which is running on a separate server).

Now, my problem is that I can't seem to get squid to log to tcp.

None of the following works*:

  • access_log tcp://[ip]:10101 squid
  • access_log /dev/tcp/[ip]/10101 squid

Question:

Why is this, and (more importantly) how do I make squid log to a socket?

*The first should work according to the documentation, there's no reason why the second shouldn't work.

share|improve this question
    
The second doesn't work because /dev/tcp does not exist on Linux systems. It is specific to the bash shell. –  grawity May 4 '12 at 11:30
    
Oh, well, that explains a lot (and at the same time it made me incredibly sad). –  Marcus Hansson May 4 '12 at 13:15

1 Answer 1

Two things.

  • Log to a socket is only supported in the legacy 2.7.x version. The function isn't ported to 3.1 yet.
  • TCP is not supported. Only udp.

The syntax is:

access_log udp:x.x.x.x:port
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.