Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 stackoverflow.com Jun 7 '10 at 1:53

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

1 Answer 1

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)

http://www.google.com.au/search?q=lighthttpd+stop+image+hotlinking

share|improve this answer

Your Answer

 
discard

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.