Jump to content

X-Sendfile


Recommended Posts

What is X-Sendfile?

In short, it's a way of allowing PHP to tell your web server to deliver files to the client after proper authentication checks, logging and other application logic has been performed.

This is far more ideal than forcing PHP to handle file transfers directly, as your web server is much more efficient in regards to handling static file transfers.

How does it work?

Normally when a web application needs to perform software logic before delivering a file to the client, PHP ends up getting stuck with the task of reading and outputting the file instead of the web server delivering the file as it normally would. With smaller websites or websites that only handle small file transfers, this is usually fine. However, for more traffic intensive websites and/or websites that handle a lot of concurrent large file transfers, this can become a problem from both a performance and scalability standpoint.

X-Sendfile removes this barrier by allowing you to perform all the application logic you need and still have the web server securely deliver the requested file to the client.

How it works is very simple. When you need to have a file delivered in PHP, all you need to do is set a special HTTP header with a path to the file in question. Then when your web server receives this header, it ignores all further output sent by PHP, strips the X-Sendfile headers, then delivers the requested static file directly.

How do you use it?

For full up-to-date installation and configuration instructions, please refer to the following guide:
https://www.makoto.io/blogs/entry/1-setting-up-x-sendfile-with-ips/

 

This topic will serve as the official community support thread for the X-Sendfile plugin (currently pending approval in the IPS marketplace),

If you run into any issues configuring X-Sendfile on your server, you can use this thread to request help as well.

Link to comment
Share on other sites

but appears it doesnt work on my end. having nginx 1.8.0 when users attempt to download it just redirect to page cannot be found

Have you customized your suites Storage Settings at all? And are you testing with attachment downloads, or IPS Download Manager downloads? If you have IDM files stored in a non web-accessible directory, it requires a bit more configuration. Otherwise, you can send me a PM here with temporary admin credentials and I'll happily take a look at it for you.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...