Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The situation: Each user has their own public HTTP directory, meant for images only. This could easily be abused by users using it to serve large files, wasting bandwidth.

The question: Is there any fairly simple way to prevent this abuse? Either by allowing the webserver to only images to be served, restricting size, or some other method.

share|improve this question

migrated from Jun 7 '10 at 1:53

This question came from our site for professional and enthusiast programmers.

There are two things you can do:

  1. Setup a rewrite rule for lighthttpd and only allow the image file extensions .Gif .jpg, .png, .jpeg
  2. Stop users from hot linking to images so that they can't simply download or link to the files for leeching

ways to stop leeching in lighthttpd (from google search)

share|improve this answer

Your Answer


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.