This is a discussion on Lighttpd Hotlink Prevention within the Web servers forums, part of the Mastering Servers category; Hello , I had a problem when i tried to integrate hotlink protection to my conf. My current lighttpd.conf file ...
|
|||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
|||
|
Hello ,
I had a problem when i tried to integrate hotlink protection to my conf. My current lighttpd.conf file is as follow. How shall i add the hotlink prevention code ? What ever i do i always get an error while restarting lighttpd. I tried using Lighttpd prevent image hotlinking or leeching or direct linking Code:
$HTTP["host"] =~ "^www.ayyas\.com$" {
server.document-root = "/home/lighttpd/ayyas.com/html"
server.errorlog = "/var/log/lighttpd/error_ayyas.log"
accesslog.filename = "/var/log/lighttpd/access_ayyas.log"
url.rewrite-once = (
"^/(sitemap.*\.(xml|txt)(\.gz)?)$" => "/vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1",
"^(/(attachments|orange|phpmyadmin|mina|highslide|xcache|geek|gars|stats|ajaxtabs|mert|blizzard|serenity|cey|arcade|mysmiliesvb|admincp|modcp|clientscript|cpstyles|images|sonstil|kirmizi|files|galeri|vampir|summer|avatars|attachments|custompics|customavatars|favicon)/.*)$" => "$1",
"^/(archive/.*)$" => "/vbseo.php?vbseourl=$1",
"^(.*(clear\.gif|favicon\.ico))$" => "$1",
"^/(.+)\?(.*)$" => "/vbseo.php?vbseourl=$1&$2",
"^/(.+)$" => "/vbseo.php?vbseourl=$1"
)
server.error-handler-404 = "/404.php"
}
$HTTP["host"] =~ "^ayyas\.com$" { url.redirect = ( "^/(.*)" => "http://www.ayyas.com/$1" ) }
|
| Sponsored Links | ||
|
|
|
||||
|
Try this
Code:
#### stop image hijacking (anti-hotlinking)
$HTTP["referer"] =~ ".*BADDOMIN\.com.*" {
url.access-deny = ( "jpg", "png", "js", "jpeg", "gif" )
}
__________________
Rocky Jr. You may have my body & soul, but you will never touch my pride! If you have knowledge, let others light their candles at it. Certified to work on HP-UX / Sun Solaris / RedHat |
![]() |
| Bookmarks |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| lighttpd ProxyPass | thunderbirdsei | Web servers | 0 | 04-30-2008 10:50 PM |
| Inactivity timer for lighttpd | petu | Web servers | 0 | 03-11-2008 12:49 PM |
| Can lighttpd access log be filtered? | petu | Web servers | 2 | 01-18-2008 10:59 AM |
| Apache and lighttpd together | anjanesh | Web servers | 4 | 08-29-2007 05:11 PM |
| redirect to www in lighttpd | muks | Web servers | 11 | 06-02-2007 10:55 PM |