apache logs referrer showing "-"

Posted on 2006-04-07
Last Modified: 2010-05-18
I'm pretty sure my log files are configured correctly. I'm using apache 1.3 and the preset combined format that is already set in the config file. when I look at my access log though, in the referrer slot I see "-". does this just mean the referrer ip wasn't in the original request? i've linked to the site from google, for instance, and did not see any reference to google in the log. any ideas?


Question by:jacobbdrew
    LVL 10

    Expert Comment

    can  you try with this one to store the referer and the user agent in your logs
    LogFormat "%h %l %u %t "%r" %>s %b \"%{Referer}i\" \"%{User-Agent}i\""
    LVL 1

    Author Comment

    that's what I'm using. (except with the escapes before the quotes around the request reference: r)

    any other thoughts? i'm running a virtual host--- maybe that has something to do with it? or the fact that it's coldfusion. i really have no idea. this does not seem like it should be to complicated.

    LVL 1

    Author Comment

    okay. i just added a straight html page to the site and linked to it and the referer showed up in the apache log. but links directly to coldfusion pages do not record the referer. hmm... i'm increasing the point value for this bugger.
    LVL 51

    Accepted Solution

    the refer(r)er  is unreliable, it may be removed anywhere on the way between the browser and your server (most likely for privacy reason), hence it is common/normal/legal that it is missing in your logs
    LVL 15

    Expert Comment

    ahoffmann beat me to it.  The log file simply displays what was reported to it as the referer;  if the browser, router, anonymizer, etc. doesn't provide the information, it won't be in your logs.

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
    If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    25 Experts available now in Live!

    Get 1:1 Help Now