Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
Makoto Posted August 31, 2015 Posted August 31, 2015 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.
sasiko Posted August 31, 2015 Posted August 31, 2015 thanks alot, never thought you would follow up on this this is much needed for my site as people download 1tb per day from my forum.
Makoto Posted August 31, 2015 Author Posted August 31, 2015 never thought you would follow up on this It only took me two years! Well, three months since you asked me for the IPB4 hook
sasiko Posted August 31, 2015 Posted August 31, 2015 hehe yeah but its better than not getting an update so theres that. 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
Makoto Posted August 31, 2015 Author Posted August 31, 2015 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 foundHave 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.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.