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 6926567
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T10:56:06+00:00 2026-05-27T10:56:06+00:00

I need some help to customize my access log on Lighttpd 1.4.28. So far

  • 0

I need some help to customize my access log on Lighttpd 1.4.28. So far I have been able to modify the configuration to display the date in a strftime(3) format. The default date format is just way too long. Here are the relevant lines from /etc/lighttpd/lighttpd.conf

accesslog.format = "%s [%{%d%b-%H:%M}t] %h      %b %U   *       %{From}i|%{Via}i|%{Referer}i    *
accesslog.filename = "/web/lighttpd_access.log"

And here is my access.log entry:

404 [24Aug-16:55] 98.68.178.112 345 /phpMyAdmin/scripts/setup.php   *   -|-|-   *   "Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.215 Safari/535.1"

Customizing the date was not hard, but I ran into a problem trying to display request URL while simultaneously using custom 404 pages. I just added

server.error-handler-404 = "/error.html"

to the lighttpd.conf file, and the lighttpd_access.log now contains redirected /error.html, instead of the full url of the request that generated the error.

200 [24Aug-16:06] 98.68.178.112 1 /error.html   *   -|-|-   *   "Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.215 Safari/535.1"

I have also tried adding %{Request_URI}i, but the log entry was - blank. Anyone knows the correct syntax to use when trying to display the original request URL in conjunction with custom 404 pages?

  • 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-05-27T10:56:06+00:00Added an answer on May 27, 2026 at 10:56 am

    This isn’t an exact fix to your issue but if your goal is just to find out what URLs are broken – use a PHP file instead for your error handler — you can still redirect to error.html (if you so wish)

    lighttpd.conf:

    server.error-handler-404 = "/error.php"
    

    error.php:

    <?
    $brokenpath = $_SERVER["REQUEST_URI"]."\n";
    $out = fopen("/foo/bar/404.txt", "a"); // save broken urls here
    fputs($out, $brokenpath);`
    fclose($out);
    header("Location: http://domain.com/error.html");
    ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Need some help about with Memcache. I have created a class and want to
Need some help, please. I have a line of horizontal thumbnails loaded as ONE
Need some help to solve this. I have a gridview and inside the gridview
Need some help from javascript gurus. I have one page where http://www.google.com/finance/converter is embedded
Need some help assigning a mouseover event to display some icons that start out
I need some help from the shell-script gurus out there. I have a .txt
Need some help, I have a regular expression that appears to work just fine
Need some help with putting this query together. I'm using Mysql I have two
Need some help. I have a table with some columns..like name , phone etc...
Need some help with a query.. I have three tables. Source id name 1

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.