0

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.

sutre
  • 101

1 Answers1

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

Doug
  • 283
  • 2
  • 10