BLACK FRIDAY DEALS

Knowledge Base

Allows you to search a variety of questions and answers

Search

Search results

Lighttpd

This was done for one of our customers who used lighttpd to stream their videos. The problem was other users were directly downloading the content from the website, which is essentially considered leeching/hotlinking and in turn using up our client's bandwidth. To prevent this, we followed these steps:

1. Find the access IP that shows up in your lighttpd access_log (typically in /var/log/lighttpd). The IP will most likely be the main IP of your server/VPS.
2. With that IP, add the following code to your lighttpd.conf file:
 

Code:

$HTTP["remoteip"] == "1.1.1.1" {
    $HTTP["url"] =~ "^/videoimagefolder/" {
      url.access-deny = ( ".flv, .jpg, .gif" )
    }
 }

Replace the IP with the IP you find your logs, the folder with the folder where your videos, images or whatever the content may be are located. Lastly, put in the extension of the files you'd like to prevent access to. So, if you only have flv files, just put ".flv" in there.

That should do it!

 

See What Our Customers Say

Leave review
A

A.L

IL, United States

AYK Solutions has provided me with a very cost effective hosting service with great uptime and lots...

Read full review
O

Oliver G

London, United Kingdom

I recently switched to AYK Solutions from Softlayer for my dedicated server requirements. I received...

Read full review
F

Francesco

Great servers, Great Service, Awesome uptime! Our company has been working with AYKSolutions for alm...

Read full review
C

Chandra

AL, Indonesia

Great service with affordable price, also helpful and kindness staff.

Read full review
ARIN Cisco Supermicro cPanel Intel Microsoft