Difference between revisions of "X-Sendfile"

From TMM Wiki
Jump to navigationJump to search
Line 3: Line 3:
 
}}
 
}}
  
 +
[[CARMA]] contains support for X-Sendfile, which allows your web server to play back or serve your gallery/video content without the file's transmission being subject to PHP timeouts or memory limits.
  
Carma has support for X-Sendfile. This allows your web server to serve your content files without having the transmission of the file subject to php timeouts and memory limits. X-Sendfile makes it so your files are sent directly to your users, taken PHP out of the process.  Using this feature can greatly improve your servers performance with Carma, especially if you have large amounts of traffic through or have extremely large content files (>= 500MB per file).  
+
X-Sendfile provides the feature of sending your gallery content or video content files directly to your users, which eliminates PHP from the process.  
  
 +
Using X-Sendfile can help to greatly improve your server's performance when working with [[CARMA]], especially if you are directing large amounts of traffic through your [[Ct#Site|site(s)]] or have extremely large content files (greater than 500MB per file).
  
 
== Web Server ==
 
== Web Server ==
Setting up and configuring X-Sendfile  is different depending on your type of server.  Currently there is only X-Sendfile support for Apache and Lighttpd. Please follow the instructions for your server below.
 
  
=== Apache ===
+
The process of setting up and configuring X-Sendfile differs depending on what type of server you have set up. Currently, X-Sendfile only offers support for Apache and Lighttpd. The following explains the setup of both Apache and Lighttpd:
To use this feature in Apache you have to first install the module [http://tn123.ath.cx/mod_xsendfile/ mod_xsendfile].  Once that module is installed you have to add the following to your .htaccess file or Apache configuration for each site in Carma:
 
XSendFile On
 
XSendFileAllowAbove On
 
  
 +
=== X-Sendfile in Apache ===
  
=== Lighttpd ===
+
If you wish to use X-Sendfile in Apache, you must first install the module [http://tn123.ath.cx/mod_xsendfile/ mod_xsendfile]. Once you have installed that module, you must add the following lines to your .htaccess file or Apache configuration for each [[Ct#Site|site]] you have set up in [[CARMA]]:
Lighttpd already has built in support for this feature however it is usually disabled by default. To enable it you will have to set this parameter:
+
* XSendFile On
fastcgi.server = ( ".php" => (( ..., "allow-x-send-file" => "enable" )) )
+
* XSendFileAllowAbove On
  
 +
=== X-Sendfile in Lighttpd ===
  
 +
Lighttpd already contains built in support for X-Sendfile-- however, this feature is usually disabled by default. In order to enable X-Sendfile, you will have to set the following parameter:
  
== Carma ==
+
* fastcgi.server = ( ".php" => (( ..., "allow-x-send-file" => "enable" )) )
  
Once you are sure that X-Sendfile is enabled for your web server you have to set the following Carma configuration variables in your config.php file:
+
== X-Sendfile in CARMA ==
  
For video support:
+
Once you have made sure that X-Sendfile is enabled for your server by following the above instructions, you will have to set the following [[CARMA]] configuration variables in your ''config.php'' file:
$config['USE_XSENDFILE'] = 1;
 
  
For image support:
+
*For video support:
$config['USE_XSENDFILE_IMAGE'] = 1;
+
** ''$config['USE_XSENDFILE'] = 1;''
  
 +
* For image support:
 +
** ''$config['USE_XSENDFILE_IMAGE'] = 1;''
  
If you need assistance setting the configuration options for Carma please put in a [http://clients.toomuchmedia.com ticket] and a tech will assist you.
+
If you need assistance setting up options in your configuration file for [[CARMA]], please [http://clients.toomuchmedia.com put in a support ticket], and a tech will assist you.

Revision as of 12:19, 2 October 2010

CARMA
Extras
The Support Admin
Admin Areas
CARMA Home
Pseudo Streaming
Flash Player
Using mp4 Videos
Zipping Content
Third Party Content
X-Sendfile
Xmoov-php
TMMid

CARMA contains support for X-Sendfile, which allows your web server to play back or serve your gallery/video content without the file's transmission being subject to PHP timeouts or memory limits.

X-Sendfile provides the feature of sending your gallery content or video content files directly to your users, which eliminates PHP from the process.

Using X-Sendfile can help to greatly improve your server's performance when working with CARMA, especially if you are directing large amounts of traffic through your site(s) or have extremely large content files (greater than 500MB per file).

Web Server

The process of setting up and configuring X-Sendfile differs depending on what type of server you have set up. Currently, X-Sendfile only offers support for Apache and Lighttpd. The following explains the setup of both Apache and Lighttpd:

X-Sendfile in Apache

If you wish to use X-Sendfile in Apache, you must first install the module mod_xsendfile. Once you have installed that module, you must add the following lines to your .htaccess file or Apache configuration for each site you have set up in CARMA:

  • XSendFile On
  • XSendFileAllowAbove On

X-Sendfile in Lighttpd

Lighttpd already contains built in support for X-Sendfile-- however, this feature is usually disabled by default. In order to enable X-Sendfile, you will have to set the following parameter:

  • fastcgi.server = ( ".php" => (( ..., "allow-x-send-file" => "enable" )) )

X-Sendfile in CARMA

Once you have made sure that X-Sendfile is enabled for your server by following the above instructions, you will have to set the following CARMA configuration variables in your config.php file:

  • For video support:
    • $config['USE_XSENDFILE'] = 1;
  • For image support:
    • $config['USE_XSENDFILE_IMAGE'] = 1;

If you need assistance setting up options in your configuration file for CARMA, please put in a support ticket, and a tech will assist you.