Knowledgebase: Step by Step Guides
Setting up and Configuring mod_auth_token
Posted by Mark [Elevated X Support], Last modified by Mark [Elevated X Support] on 01 May 2014 04:53 PM

Why use mod_auth_token.

The mod_auth_token module is a free apache module that can be used to work around playback issues when using simple password management in Apache.

Several devices (such as android devices) have issues playing back movies that hide behind a paywall. The mod_auth_token module solves these playback issues without requiring any paid third-party protection scripts.

How it works:

The way this works is by having the CMS replace links to content such as:

/members/content/contentthumbs/1.jpg

With URLs like this:

/download/65b19c2e0f410c85486159cef7766664/532d3167/contentthumbs/1.jpg

These URLs are only valid for a temporary amount of time.

How to set up mod_auth_token.

Setting up mod_auth_token is a four step process:

1) Have your hosting provider add mod_auth_token to your apache server.

2) Have your hosting provider create a symlink that links to your /members/content/ folder.

Example:
If your members area is in:
http://mysite.com/members/

The link http://mysite.com/download/ should be a symlink that points to http://mysite.com/members/content/

3) Have your hosting provider set up a <Location> entry within the apache virtual host configuration file for your domain.

Example:

<Location /download/>
# Secret key - This should be changed by your host.
  AuthTokenSecret "mysecretkey"
  AuthTokenPrefix /download/
# Timeout length. URLs will expire after 5 minutes. Your host can increase or decrease this amount of time.
  AuthTokenTimeout 300
  AuthTokenLimitByIp off
</Location>

4) Within your members area cmsinclude.ini.php, add the following flags to the bottom of the file:

; This should be the link to the existing content folder.
MOD_AUTH_TOKEN_CONTENT="/members/content/"

; This should be the set to what the host set AuthTokenPrefix as.
MOD_AUTH_TOKEN_PREFIX="/download/"

; This should be set to what the host set AuthTokenSecret as.
MOD_AUTH_TOKEN_SECRET="mysecretkey"

; Set this to the value that your host set AuthTokenLimitByIp as
MOD_AUTH_TOKEN_LIMITIP="off"

The values for each of these should be changed to reflect the URL of your members area, using the settings provided by your host.

Once these are in place, your members area should be configured to use mod_auth_token.

More Information on mod_auth_token

More information on this server module can be found here:

https://code.google.com/p/mod-auth-token/

(2 vote(s))
Helpful
Not helpful

Comments (0)