Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8632879
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T09:24:43+00:00 2026-06-12T09:24:43+00:00

I want to get Varnish to log requests. I found the command varnishlog -a

  • 0

I want to get Varnish to log requests. I found the command varnishlog -a -w /var/log/varnish.log, but it does not log anything.

Then I found that Varnish does not write to log by default. However I am unable to find configuration options for logging.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T09:24:44+00:00Added an answer on June 12, 2026 at 9:24 am

    If you want to log HTTP requests in NCSA Common Log Format you need to use varnishncsa. On CentOS/RedHat, the Varnish RPM package includes a varnishncsa init script that you can use to start logging. By default it logs to logfile="/var/log/varnish/varnishncsa.log".

    Additionally if you wish to serve several different hosts through a single Varnish install, you’ll want to include the host name in the log as well. This can be accomplished with the following setting in /etc/sysconfig/varnishncsa

    DAEMON_OPTS="$DAEMON_OPTS -F '%{Host}i %h %l %u %t \"%r\" %s %b \"%{Referer}i\" \"%{User-agent}i\"'"
    

    Please note that the method described in the link by Anshu only logs the requests that are passed through by Varnish to the backend servers. Cache hit requests will never be recorded (before Varnish 5.0 – see below). Therefore the HTTPD logs gathered this way cannot be used for statistical analysis.

    Update: As @VikrantPogula mentioned, as of Varnish 5.0 all client requests are logged – including cache hits. This is the default behavior, and can be switched on explicitly using the -c switch.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i want get the bound of drawable but then i use getBounds or copyBounds
I want get all of the Geom objects that are related to a certain
I want to get a list of files and then read the results into
I have a color and I want get a tint of that color by
I want get data in db to listview. but it have error I cannot
I want get all the accesskeys that are on a button or link. I
I want get the exact age of the following date in var $birth_date by
I Want get Param values(src) from Html to AS3 that allows us to maintain
I want get from database table row name but in it i get error.
I want get from after click $_POST['name'] and where it with name inserting that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.