Difference between revisions of "X-Sendfile"
TMMStephenY (talk | contribs) |
|||
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. | ||
− | + | 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 == | ||
− | |||
− | + | 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 [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]]: | |
− | + | * 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 | + | *For video support: |
− | + | ** ''$config['USE_XSENDFILE'] = 1;'' | |
+ | * For image support: | ||
+ | ** ''$config['USE_XSENDFILE_IMAGE'] = 1;'' | ||
− | If you need assistance setting | + | 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 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.