Difference between revisions of "X-Sendfile"

From TMM Wiki
Jump to navigationJump to search
Line 1: Line 1:
 
 
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).  
 
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).  
  
Line 7: Line 6:
  
 
=== Apache ===
 
=== Apache ===
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:
+
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
 
  XSendFile On
 
  XSendFileAllowAbove On
 
  XSendFileAllowAbove On
Line 29: Line 28:
  
  
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 the configuration options for Carma please put in a [http://clients.toomuchmedia.com ticket] and a tech will assist you.

Revision as of 11:27, 16 January 2009

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).


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

To use this feature in Apache you have to first install the module 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


Lighttpd

Lighttpd already has support for this feature however it is usually disabled by default. To enable it you will have to set this parameter:

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


Carma

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:

For video support:

$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 ticket and a tech will assist you.