<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Wed, 22 May 2013 11:19:36 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Slawek's Blog: Efficient file serving in PHP application with nginx]]></title>
      <guid>http://www.phpdeveloper.org/news/16104</guid>
      <link>http://www.phpdeveloper.org/news/16104</link>
      <description><![CDATA[<p>
In a <a href="http://www.leftjoin.net/2011/03/efficient-file-serving-in-php-application-with-nginx/">quick new post</a> to his blog today <i>Slawek</i> looks at a method he's come up with to more efficiently serve up files in a PHP application using the <a href="http://nginx.org/">nginx</a> web server.
</p>
<blockquote>
Sometimes we need to serve files directly from application, especially when file access is restricted by account permissions. Using readfile() to achieve this can successfully kill our web server - even without huge load. To avoid performance problems we can use nginx X-Accel-Redirect feature, and serve files from application through nginx server.
</blockquote>
<p>
He sets up an example situation - serving up gallery images for a basic site - and shows how to configure the nginx server with the "/gallery" directory and the PHP code you'll need to push the "X-Accel-Redirect" header along with the contents of the image.
</p>]]></description>
      <pubDate>Fri, 25 Mar 2011 12:34:34 -0500</pubDate>
    </item>
  </channel>
</rss>
