Archive

Posts Tagged ‘lighttpd’

AVS Lighttpd Mods

December 28, 2009 2 comments

Hi,

Are you running both Apache and Lighttpd just to use lighttpd mod_flv_streaming and mod_secdownload? If yes, then i recommend you run AVS only with lighttpd (lighttpd + php-fcgi + mysql). Your Adult Video Script tube site will be faster.

NOTE 1: you need ssh root access on the server where AVS is installed!
NOTE 2: you might want to check if you have other sites running, that require Apache!
NOTE 3: you wont be able to use Cpanel :-)

This mod includes:
- lighttpd installation + configuration to work with php-fcgi
- AVS modifications to work with lighttpd

Price: 99$

Please use the contact form for more information (or post a comment)!

Prevent video hotlinking in AVS

December 27, 2009 7 comments

Hi,

As requested in the AVS forum, i wrote a small howto on how to prevent hotlinking (or at least try) for Adult Video Script flash videos (flv).

Here’s what you can do:

  • Use lighttpd. Lighttpd with mod_secdownload is exactly what you need to prevent hotlinking. Set the timeout for the flv file to maximum 2 hours (in lighttpd.conf and include/config.local.php). Change the lighttpd key for the temporary link creation (in lighttpd.conf and include/config.local.php). You can also keep your videos in a directory that is not accessible from the web (in this case you need to edit lighttpd.conf and some code in the AVS script).
  • Even if you use lighttpd users can still download/leech your videos if they know the location (doesnt work if you keep the videos in a directory that cannot be accessed from the web, or if you change the location). To prevent this you can use .htaccess and add
    a few reffer rules: basically if the request for the flv file doesnt come from your own domain/ip, drop this request (you need to create the .htaccess in the media/videos/flv directory).

    Here’s a example for AVS:

    RewriteEngine On
    RewriteCond %{HTTP_REFERER} !^http://yousite.com/ [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.yousite.com/ [NC]
    RewriteRule [^/]+.(flv)$ - [F]
    

  • If you dont offer the embed feature, you can also add some refferer rules in .htaccess for the media/player directory. All requests for files in this directory should be limited to your server’s ip/domain.

  • If you use lighttpd + mod_secdownload, you also need to add refferer rules in lighttpd.conf.
  • Use a flash player that can encrypt the url based on a key (flowplayer can do this). The key has to be hard-coded in the flash player.

If you have any ideas/critics…feel free to comment!

AVS JW Player integration mod

December 3, 2009 5 comments

Hi,

Seems like the jw player is very popular among AVS users. Here’s is a simple howto on how to integrate the JW Player with Adult Video Script (removing the AVS flash player).

Download the JW Player from http://www.longtailvideo.com/players/jw-flv-player/ and upload the contents of the archive to /WHERE/AVS/IS/INSTALLED/jw (create this directory if necesary).

Create the following file /WHERE/AVS/IS/INSTALLED/templates/frontend/CURRENTLY-USED-TEMPLATE/video_jw.tpl and
add these linese:

<script type='text/javascript' src="{$relative}/jw/swfobject.js"></script>
<script type='text/javascript'>
    var s1 = new SWFObject('{$relative}/jw/player.swf','player','630','500','9');
    s1.addParam('allowfullscreen','true');
    s1.addParam('allowscriptaccess','always');
    s1.addVariable('autostart','true');
    s1.addVariable('bufferlength', '3');
    s1.addVariable('file', '{$baseurl}/media/videos/flv/{$video.VID}.flv');
    s1.addVariable('id', 'player');
    s1.addVariable("stretching", "uniform");
    s1.write('player');
</script>

Edit /WHERE/AVS/IS/INSTALLED/tempaltes/frontend/CURRENTLY-USED-TEMPLATE/video.tpl and
replace following line:

{include file='video_vplayer.tpl'}

with:

{include file='video_jw.tpl'}

This integration ads the JW Player to AVS without any special plugins (basically just the player, no plugins, no ads). The JW player can be also configured to work with lighttpd on AVS but i’ll let this be the text for another howto… :-)

Follow

Get every new post delivered to your Inbox.