<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Apache 2 | Nerdpress.org</title>
	<atom:link href="https://nerdpress.org/tag/apache-2/feed/" rel="self" type="application/rss+xml" />
	<link>https://nerdpress.org</link>
	<description>...dev, tech problems and solutions.</description>
	<lastBuildDate>Fri, 18 Jan 2019 07:34:58 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>Apache upgrade : Unknown Authz provider: from</title>
		<link>https://nerdpress.org/2019/01/18/apache-upgrade-unknown-authz-provider-from/</link>
		
		<dc:creator><![CDATA[Ivo Bathke]]></dc:creator>
		<pubDate>Fri, 18 Jan 2019 07:34:55 +0000</pubDate>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[vServer]]></category>
		<category><![CDATA[Apache 2]]></category>
		<category><![CDATA[facepalm]]></category>
		<guid isPermaLink="false">https://nerdpress.org/?p=2855</guid>

					<description><![CDATA[<p>For the record: If you ever encounter this error while upgrading Apache webserver 2.2 to 2.4: Then you probably made a mistake replacing: with And just replaced allow with Require and not the complete directive, like: Then its time for a double facepalm :)</p>
The post <a href="https://nerdpress.org/2019/01/18/apache-upgrade-unknown-authz-provider-from/">Apache upgrade : Unknown Authz provider: from</a> first appeared on <a href="https://nerdpress.org">Nerdpress.org</a>.]]></description>
										<content:encoded><![CDATA[<p>For the record:<br> If you ever encounter this error while <a href="https://httpd.apache.org/docs/2.4/upgrading.html">upgrading Apache webserver 2.2 to 2.4</a>:</p>


<pre class="wp-block-code"><span><code class="hljs language-javascript">Unknown Authz provider: <span class="hljs-keyword">from</span></code></span></pre>


<p>Then you probably made a mistake replacing:</p>


<pre class="wp-block-code"><span><code class="hljs language-javascript">allow <span class="hljs-keyword">from</span> all </code></span></pre>


<p>with</p>


<pre class="wp-block-code"><span><code class="hljs language-php"><span class="hljs-keyword">Require</span> all granted</code></span></pre>


<p>And just replaced <em>allow</em> with <em>Require</em> and not the complete directive, like:</p>


<pre class="wp-block-code"><span><code class="hljs language-javascript">Require <span class="hljs-keyword">from</span> all</code></span></pre>


<p>Then its time for a double facepalm :)</p>The post <a href="https://nerdpress.org/2019/01/18/apache-upgrade-unknown-authz-provider-from/">Apache upgrade : Unknown Authz provider: from</a> first appeared on <a href="https://nerdpress.org">Nerdpress.org</a>.]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>X-Sendfile + Apache 2 (Ubuntu)</title>
		<link>https://nerdpress.org/2010/03/24/x-sendfile-apache-2-ubuntu/</link>
					<comments>https://nerdpress.org/2010/03/24/x-sendfile-apache-2-ubuntu/#comments</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Wed, 24 Mar 2010 09:23:01 +0000</pubDate>
				<category><![CDATA[API]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Software engineering]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Apache 2]]></category>
		<category><![CDATA[mod_xsendfile]]></category>
		<category><![CDATA[X-Sendfile]]></category>
		<guid isPermaLink="false">https://nerdpress.org/?p=857</guid>

					<description><![CDATA[<p>Ein recht verstecktes Feature, das neuere Server, bspw. Lighthttpd + FCGI-Modul bereits &#8220;out of the box&#8221; unterstützen, ist das anwendungsgesteuerte &#8220;Durchschleifen&#8221; von großen Dateien via X-Sendfile Header. Wozu es gut ist und wie man es benutzt,will ich im Folgenden kurz erläutern: Im Prinzip dasseselbe wie fpassthru(), aber eben ohne dass PHP den auszuliefernden Datenstrom komplett &#8230; </p>
<p class="link-more"><a href="https://nerdpress.org/2010/03/24/x-sendfile-apache-2-ubuntu/" class="more-link">Continue reading<span class="screen-reader-text"> "X-Sendfile + Apache 2 (Ubuntu)"</span></a></p>
The post <a href="https://nerdpress.org/2010/03/24/x-sendfile-apache-2-ubuntu/">X-Sendfile + Apache 2 (Ubuntu)</a> first appeared on <a href="https://nerdpress.org">Nerdpress.org</a>.]]></description>
										<content:encoded><![CDATA[<p>Ein recht verstecktes Feature, das neuere Server, bspw. Lighthttpd + FCGI-Modul bereits &#8220;out of the box&#8221; unterstützen, ist das anwendungsgesteuerte &#8220;Durchschleifen&#8221; von großen Dateien via X-Sendfile Header.</p>
<p>Wozu es gut ist und wie man es benutzt,will ich im Folgenden kurz erläutern:</p>
<p><span id="more-857"></span></p>
<p>Im Prinzip dasseselbe wie <a href="http://de.php.net/manual/de/function.fpassthru.php">fpassthru()</a>, aber eben ohne dass PHP den auszuliefernden Datenstrom komplett in den Speicher laden muss. Somit verbindet X-Sendfile die beiden Vorteile, dass bspw. Zugriffsberechtigungen applikationsseitig via PHP geprüft werden können und dass die Response selbst ausschließlich durch den darunterliegenden Server (in dem Fall Apache 2) ausliefert wird (und PHP komplett umgeht).</p>
<p>Somit ist es möglich, das PHP-eigene memory_limit zu umgehen und auch riesige Dateien zum (PHP-geschützten) Download bereitzustellen.</p>
<p>Für den Apachen gibt es zur Unterstützung dieses Features <a href="http://tn123.ath.cx/mod_xsendfile">mod_xsendfile</a>. Das Modul ist leider nicht in den offiziellen Ubuntu-Paketquellen enthalten, und auch dotdeb konnte mir bei meiner Suche nicht weiterhelfen. Die Übersetzung + Installation via apxs2 läuft aber unter Ubuntu problemlos (apxs2 ist jeweils in den Paketen apache2-prefork-dev und apache2-threaded-dev enthalten). Standard unter Ubuntu oder generell Gnu/Linux sollte &#8220;Prefork&#8221; sein.</p>
<pre class="brush: bash; title: ; notranslate">apxs -cia mod_xsendfile.c</pre>
<p>kompiliert das Modul und installiert es nach /usr/lib/apache2/modules. Anschließend erstellt man eine neue Konfigurationsdatei unter /etc/apache2/mods-available/mod_xsendfile.load mit folgendem Inhalt:</p>
<pre class="brush: plain; title: ; notranslate">
LoadModule xsendfile_module /usr/lib/apache2/modules/mod_xsendfile.so
&lt;Files *.php&gt;
  XSendFile on
  XSendFileAllowAbove on
&lt;/Files&gt;
</pre>
<p>Dann das Modul noch mit</p>
<pre class="brush: bash; title: ; notranslate">$ a2enmod xsendfile</pre>
<p>aktivieren.</p>
<p>So hats bei mir auf Anhieb funktioniert,  zu den einzelnen Einstellungsmöglichkeiten schaut man dann einfach nochmal in die <a href="http://tn123.ath.cx/mod_xsendfile/">Doku</a>.</p>
<p>Das PHP-Script sieht dann exemplarisch folgendermaßen aus:</p>
<pre class="brush: php; title: ; notranslate">
if($user-&gt;isAuthenticated())
{
  // Wir werden eine Binär-Datei ausgeben
  header('Content-type: application/octet-stream');

  // Es wird downloaded.pdf benannt
  header('Content-Disposition: attachment; filename=&quot;'.$file-&gt;getFilename().'&quot;');
  header('Content-Length: ' . $file-&gt;getSize());
  // PASS X-SENDFILE-HEADER.
  header('X-Sendfile: ' . $file-&gt;getPathname());
}
</pre>
<p>Das war einfach, oder?</p>The post <a href="https://nerdpress.org/2010/03/24/x-sendfile-apache-2-ubuntu/">X-Sendfile + Apache 2 (Ubuntu)</a> first appeared on <a href="https://nerdpress.org">Nerdpress.org</a>.]]></content:encoded>
					
					<wfw:commentRss>https://nerdpress.org/2010/03/24/x-sendfile-apache-2-ubuntu/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
	</channel>
</rss>
