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

  • SEARCH
  • Home
  • 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 583605
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T14:48:37+00:00 2026-05-13T14:48:37+00:00

Is it possible to configure lighttpd so that a request for a file succeeds

  • 0

Is it possible to configure lighttpd so that a request for a file succeeds if the file exists, but is handled and redirected, for example to a cgi script, if the file does not exist?

What I’m trying to achieve is having a set of image files on disk which are generated by a script and served directly. On a request, if the file does not exist, the script will generate the image and save it to disk (for future requests) and then either serve the image directly or redirect back to the same URL which will this time succeed. I’m essentially caching the generated output on disk.

I currently have a prototype in which the script always handles the request, reading and echoing the file if it exists, but I’d rather save the overhead and have lighttpd serve it directly if possible.

  • 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-13T14:48:38+00:00Added an answer on May 13, 2026 at 2:48 pm

    You can have the best of both worlds. Lighttpd will serve the file if you give it a

    X-Sendfile: path to file
    

    see: http://redmine.lighttpd.net/wiki/1/X-LIGHTTPD-send-file. There’s a php example on the documentation page.

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

Sidebar

Related Questions

Is it possible to configure the default file extension that Oracle's Pro*COBOL precompiler assumes
Is it possible to conditionally configure Lighttpd based on custom request headers? It's possible
Is it possible to configure xampp to serve up a file outside of the
Is it possible to configure Windows Servers that reside on the same domain such
Is it possible to configure the TreeView control in the Silverlight tookit such that
Is it possible to configure the ClickOnce installation so that it requires .Net Framework
I remember reading somewhere that it's possible to configure your web.config to send email
Is it possible configure Mandatory Inlines in Django Admin Site? For example, Student page
Is it possible to configure nHibernate to connect to Paradox database ( *.db files)?
Is it possible to configure two separate web apps (WAR) in a J2EE application

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.