X-Accel-Redirect/X-Sendfile

jealbr

Member
I have WordPress site that's using WooCommerce and will be selling digital downloads. They recommend using X-Accel-Redirect/X-Sendfile. So I'm wondering if this module is already on the VPS'?
 
Neither are installed on my dedi so I'm assuming not. However you can check by using some PHP scripts...
PHP:
<?php
    if (function_exists('apache_get_modules') && in_array('mod_xsendfile', apache_get_modules())) {
        echo "X-Sendfile is Installed and working";
    }
?>
If you get "X-Sendfile is Installed and working" then you know it's installed.

PHP:
<?php
    header('X-Accel-Redirect: /path/to/file');
?>
Replace the path to file with a real path to a test file. If you only get a blank page than it's not installed.
 
The easiest for you would probably be to login to cPanel, open file manager, create a new 'test.php' file, copy the code into the .php file on your server. Then navigate to the php page in a browser and see the results, or lack thereof if these features are not installed, which I have a feeling that they're not. For the X-Accel test you'll need to modify the code to point to a test file. For example, create a test.txt file in the same location as the test php file and change the header function to
PHP:
header('X-Accel-Redirect: test.txt');
These features can be easily installed, but you'll probably want KH support to do that for you, I'm sure they'll be happy to.
 
Top