<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Webserver on Ulis Notizen</title>
    <link>https://wolf-u.li/tag/webserver/</link>
    <description>Recent content in Webserver on Ulis Notizen</description>
    <generator>Hugo -- 0.155.3</generator>
    <language>de</language>
    <copyright>Copyright 2006-CURRENTYEAR Uli Wolf - All rights reserved</copyright>
    <lastBuildDate>Mon, 22 May 2017 20:46:41 +2200</lastBuildDate>
    <atom:link href="https://wolf-u.li/tag/webserver/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Webserver lighttpd mit php5.2 auf dem Conceptronic CH3SNAS installieren</title>
      
      
      <link>https://wolf-u.li/webserver-lighttpd-mit-php52-auf-dem-conceptronic-ch3snas-installieren/</link>
      <pubDate>Tue, 13 Nov 2007 14:05:11 +1300</pubDate>
      <guid>https://wolf-u.li/webserver-lighttpd-mit-php52-auf-dem-conceptronic-ch3snas-installieren/</guid>
      <description>&lt;p&gt;Diese Anleitung bezieht sich auf &lt;a href=&#34;https://wolf-u.li/tag/fun_plug/&#34;
    title=&#34;fun_plug&#34; 
   &gt;
  fun_plug&lt;/a&gt;&amp;rsquo;s der Versionen 0.3 und 0.4.&lt;/p&gt;
&lt;p&gt;Die Anleitung für 0.5 befindet sich &lt;a href=&#34;https://wolf-u.li/1425/php-und-mysql-auf-dem-conceptronic-ch3snas-bzw-d-link-dns-323-installieren/&#34;
    title=&#34;hier&#34; 
   &gt;
  hier&lt;/a&gt;.
Als Fortsetzung meiner Artikelreihe zum &lt;a href=&#34;https://wolf-u.li/tag/ch3snas/&#34;
    title=&#34;CH3SNAS&#34; 
   &gt;
  CH3SNAS&lt;/a&gt; wird hier die Möglichkeit, einen Webserver mit PHP-Unterstützung zu installieren, beschrieben.
Mit Hilfe des &lt;a href=&#34;https://wolf-u.li/759/fun_plug-fuer-das-conceptronic-ch3snas/&#34;
    title=&#34;&amp;ldquo;fun_plugs&amp;rdquo; (Artikel)&#34; 
   &gt;
  &amp;ldquo;fun_plugs&amp;rdquo; (Artikel)&lt;/a&gt; kann der Webserver lighttpd mit PHP5.2 installiert werden, um zum Beispiel PHP-Bildergallerien oder CMS-Systeme zu betreiben. Dank des niedrigen Hauptspeicherverbrauchs werden die 64MB Ram des CH3SNAS nicht überstrapaziert. Übermäßige Leistung sollte man trotzdem nicht erwarten ;)&lt;/p&gt;</description>
      
         <content:encoded><![CDATA[<p>Diese Anleitung bezieht sich auf <a href="/tag/fun_plug/"
    title="fun_plug" 
   >
  fun_plug</a>&rsquo;s der Versionen 0.3 und 0.4.</p>
<p>Die Anleitung für 0.5 befindet sich <a href="/1425/php-und-mysql-auf-dem-conceptronic-ch3snas-bzw-d-link-dns-323-installieren/"
    title="hier" 
   >
  hier</a>.
Als Fortsetzung meiner Artikelreihe zum <a href="/tag/ch3snas/"
    title="CH3SNAS" 
   >
  CH3SNAS</a> wird hier die Möglichkeit, einen Webserver mit PHP-Unterstützung zu installieren, beschrieben.
Mit Hilfe des <a href="/759/fun_plug-fuer-das-conceptronic-ch3snas/"
    title="&ldquo;fun_plugs&rdquo; (Artikel)" 
   >
  &ldquo;fun_plugs&rdquo; (Artikel)</a> kann der Webserver lighttpd mit PHP5.2 installiert werden, um zum Beispiel PHP-Bildergallerien oder CMS-Systeme zu betreiben. Dank des niedrigen Hauptspeicherverbrauchs werden die 64MB Ram des CH3SNAS nicht überstrapaziert. Übermäßige Leistung sollte man trotzdem nicht erwarten ;)</p>
<p>Die derzeitigen Softwareversionen sind lighttpd 1.4.17 und PHP 5.2.4, welche in den Paketen <link rel=dns-prefetch href=//www.inreto.de /> <a href="http://www.inreto.de/dns323/fun-plug/0.3/lighttpd-1.4.17.tgz"
    title="lighttpd-1.4.17.tgz" 
     target="_blank" rel="nofollow noopener noreferrer" >
  lighttpd-1.4.17.tgz&nbsp;<svg xmlns="http://www.w3.org/2000/svg" class="icon" aria-hidden="true" focusable="false" viewBox="0 -128 512 640">
    <path d="M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z"/>
  </svg></a> und <link rel=dns-prefetch href=//www.inreto.de /> <a href="http://www.inreto.de/dns323/fun-plug/0.3/php-5.2.4.tgz"
    title="php-5.2.4.tgz" 
     target="_blank" rel="nofollow noopener noreferrer" >
  php-5.2.4.tgz&nbsp;<svg xmlns="http://www.w3.org/2000/svg" class="icon" aria-hidden="true" focusable="false" viewBox="0 -128 512 640">
    <path d="M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z"/>
  </svg></a> im <link rel=dns-prefetch href=//www.inreto.de /> <a href="http://www.inreto.de/dns323/fun-plug/0.3/"
    title="Repository von fonz" 
     target="_blank" rel="nofollow noopener noreferrer" >
  Repository von fonz&nbsp;<svg xmlns="http://www.w3.org/2000/svg" class="icon" aria-hidden="true" focusable="false" viewBox="0 -128 512 640">
    <path d="M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z"/>
  </svg></a> zu finden sind.</p>
<p>Nach dem Herunterladen legt man die Dateien auf das NAS und installiert diese, wie schon in der &ldquo;fun_plug&rdquo;-Anleitung beschrieben wurde, mittels <code>funpkg.sh /pfad/zum/paket/name.tgz</code>, also z.B. <code>funpkg.sh /mnt/HD_a2/lighttpd-1.4.17.tgz</code> bzw. <code>funpkg.sh /mnt/HD_a2/php-5.2.4.tgz</code>.</p>
<p>Anschließend kann php bzw lighttpd konfiguriert werden. Hierzu geht man in <code>/mnt/HD_a2/fun_plug.d/etc/</code> und bennent die Datei <code>lighttpd.conf-with-php-sample</code> in <code>lighttpd.conf</code> um. Nun kann man die Datei editieren (evtl muss hierzu der Editor joe aus dem Repository von fonz installiert werden) und die Einstellungen anpassen.</p>
<p>Zuletzt muss die Starterdatei von lighttpd im &ldquo;start&rdquo;-Verzeichnis noch ausführbar gemacht werden (chmod a+x lighttpd.sh), damit der lighttpd beim Start des NAS mitgeladen wird.</p>
]]></content:encoded>
    </item>
    <item>
      <title>Website-Speedtest aus Sicht von Google</title>
      
      
      <link>https://wolf-u.li/website-speedtest-aus-sicht-von-google/</link>
      <pubDate>Tue, 07 Jun 2016 19:47:31 +0700</pubDate>
      <guid>https://wolf-u.li/website-speedtest-aus-sicht-von-google/</guid>
      <description>&lt;p&gt;Bin gerade darüber gestolpert: &lt;link rel=dns-prefetch href=//testmysite.thinkwithgoogle.com /&gt; &lt;a href=&#34;https://testmysite.thinkwithgoogle.com/&#34;
    title=&#34;https://testmysite.thinkwithgoogle.com/&#34; 
     target=&#34;_blank&#34; rel=&#34;nofollow noopener noreferrer&#34; &gt;
  https://testmysite.thinkwithgoogle.com/&amp;nbsp;&lt;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; class=&#34;icon&#34; aria-hidden=&#34;true&#34; focusable=&#34;false&#34; viewBox=&#34;0 -128 512 640&#34;&gt;
    &lt;path d=&#34;M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z&#34;/&gt;
  &lt;/svg&gt;&lt;/a&gt;&lt;/p&gt;</description>
      
         <content:encoded><![CDATA[<p>Bin gerade darüber gestolpert: <link rel=dns-prefetch href=//testmysite.thinkwithgoogle.com /> <a href="https://testmysite.thinkwithgoogle.com/"
    title="https://testmysite.thinkwithgoogle.com/" 
     target="_blank" rel="nofollow noopener noreferrer" >
  https://testmysite.thinkwithgoogle.com/&nbsp;<svg xmlns="http://www.w3.org/2000/svg" class="icon" aria-hidden="true" focusable="false" viewBox="0 -128 512 640">
    <path d="M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z"/>
  </svg></a></p>
<p>Ich schneide gar nicht sooo schlecht ab ;)</p>
<p><img src="/upload/2016/06/5651-google-speedtest.webp" alt="5651-google-speedtest" loading="lazy"></p>
]]></content:encoded>
    </item>
    <item>
      <title>htaccess Dateien mit PHP für die Verwendung mit Nginx erzeugen</title>
      
      
      <link>https://wolf-u.li/htaccess-dateien-mit-php-erzeugen/</link>
      <pubDate>Wed, 26 Jun 2013 06:22:46 +2600</pubDate>
      <guid>https://wolf-u.li/htaccess-dateien-mit-php-erzeugen/</guid>
      <description>&lt;p&gt;Gelegentlich muss ich in Nginx den passwortschutz für eine Seite konfigurieren. Jedes Mal suche ich wieder, wie ich das am einfachsten auf der Kommandozeile durchführe, da htpasswd eigentlich eine Apache-Tool ist.&lt;/p&gt;
&lt;p&gt;Ich habe bei mir immer PHP installiert, daher werde ich das nutzen. Um das Passwort &amp;ldquo;fooB4rB4z&amp;rdquo; in einer htpassed-Datei zu generieren, muss der Befehl dazu wie folgt aussehen:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;php -r &lt;span class=&#34;s2&#34;&gt;&amp;#34;echo crypt(&amp;#39;fooB4rB4z&amp;#39;, base64_encode(&amp;#39;fooB4rB4z&amp;#39;));&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Das sieht dann so aus:
[&lt;img src=&#34;https://wolf-u.li/upload/2013/06/2013-06-26_08-18-30.webp&#34; alt=&#34;htpasswd für PHP&#34; loading=&#34;lazy&#34;&gt;&lt;/p&gt;</description>
      
         <content:encoded><![CDATA[<p>Gelegentlich muss ich in Nginx den passwortschutz für eine Seite konfigurieren. Jedes Mal suche ich wieder, wie ich das am einfachsten auf der Kommandozeile durchführe, da htpasswd eigentlich eine Apache-Tool ist.</p>
<p>Ich habe bei mir immer PHP installiert, daher werde ich das nutzen. Um das Passwort &ldquo;fooB4rB4z&rdquo; in einer htpassed-Datei zu generieren, muss der Befehl dazu wie folgt aussehen:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">php -r <span class="s2">&#34;echo crypt(&#39;fooB4rB4z&#39;, base64_encode(&#39;fooB4rB4z&#39;));&#34;</span>
</span></span></code></pre></td></tr></table>
</div>
</div><p>Das sieht dann so aus:
[<img src="/upload/2013/06/2013-06-26_08-18-30.webp" alt="htpasswd für PHP" loading="lazy"></p>
<p>Dann fügt man diesen String wie folgt in die htpasswd ein:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">echo</span> <span class="s1">&#39;MyCoolUsername:Zmi.VLGYm/RZM&#39;</span> <span class="p">&amp;</span>gt<span class="p">;&amp;</span>gt<span class="p">;</span> /etc/nginx/htpasswd
</span></span></code></pre></td></tr></table>
</div>
</div><p>Dann muss man noch den VHost konfigurieren:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">location / <span class="o">{</span>
</span></span><span class="line"><span class="cl">  auth_basic  <span class="s2">&#34;Restricted Area - Please enter Username &amp;amp; Password&#34;</span><span class="p">;</span>
</span></span><span class="line"><span class="cl">  auth_basic_user_file  /etc/nginx/htpasswd<span class="p">;</span>
</span></span><span class="line"><span class="cl"><span class="o">}</span>
</span></span></code></pre></td></tr></table>
</div>
</div><p>Einmal die Konfiguration von Nginx neu einlesen lassen und schon kann man sich per &ldquo;<code>MyCoolUsername</code>&rdquo; mit dem passwort &ldquo;<code>fooB4rB4z</code>&rdquo; einloggen.</p>
]]></content:encoded>
    </item>
    <item>
      <title>PHP und MySQL auf dem Conceptronic CH3SNAS bzw. D-Link DNS-323 installieren</title>
      
      
      <link>https://wolf-u.li/php-und-mysql-auf-dem-conceptronic-ch3snas-bzw-d-link-dns-323-installieren/</link>
      <pubDate>Sat, 05 Jul 2008 22:42:58 +0500</pubDate>
      <guid>https://wolf-u.li/php-und-mysql-auf-dem-conceptronic-ch3snas-bzw-d-link-dns-323-installieren/</guid>
      <description>&lt;p&gt;&lt;strong&gt;Dieses Tutorial bezieht sich auf fun_plug 0.5, welches veraltet ist und daher nicht mehr genutzt werden sollte! Dieses Tutorial ist daher ebenfalls veraltet! Bitte sehe &lt;a href=&#34;https://wolf-u.li/nas/tutorials/ffp/&#34;
    title=&#34;hier&#34; 
   &gt;
  hier&lt;/a&gt; nach den aktuellen Tutorials!&lt;/strong&gt;
Nach meinem Artikel über die Installation von &lt;a href=&#34;https://wolf-u.li/760/webserver-lighttpd-mit-php52-auf-dem-conceptronic-ch3snas-installieren/&#34;
    title=&#34;PHP5.2 zusammen mit dem Webserver lighttpd&#34; 
   &gt;
  PHP5.2 zusammen mit dem Webserver lighttpd&lt;/a&gt; gehe ich nun einen Schritt weiter. Es geht konkret um die Installation von &lt;a href=&#34;https://wolf-u.li/tag/mysql/&#34;
    title=&#34;MySQL&#34; 
   &gt;
  MySQL&lt;/a&gt;5.1 inklusive &lt;a href=&#34;https://wolf-u.li/tag/php/&#34;
    title=&#34;PHP&#34; 
   &gt;
  PHP&lt;/a&gt;5.2 zusammen mit dem &lt;a href=&#34;https://wolf-u.li/tag/webserver/&#34;
    title=&#34;Webserver&#34; 
   &gt;
  Webserver&lt;/a&gt; lighttpd auf dem NAS.&lt;/p&gt;</description>
      
         <content:encoded><![CDATA[<p><strong>Dieses Tutorial bezieht sich auf fun_plug 0.5, welches veraltet ist und daher nicht mehr genutzt werden sollte! Dieses Tutorial ist daher ebenfalls veraltet! Bitte sehe <a href="/nas/tutorials/ffp/"
    title="hier" 
   >
  hier</a> nach den aktuellen Tutorials!</strong>
Nach meinem Artikel über die Installation von <a href="/760/webserver-lighttpd-mit-php52-auf-dem-conceptronic-ch3snas-installieren/"
    title="PHP5.2 zusammen mit dem Webserver lighttpd" 
   >
  PHP5.2 zusammen mit dem Webserver lighttpd</a> gehe ich nun einen Schritt weiter. Es geht konkret um die Installation von <a href="/tag/mysql/"
    title="MySQL" 
   >
  MySQL</a>5.1 inklusive <a href="/tag/php/"
    title="PHP" 
   >
  PHP</a>5.2 zusammen mit dem <a href="/tag/webserver/"
    title="Webserver" 
   >
  Webserver</a> lighttpd auf dem NAS.</p>
<p>Voraussetzung für die Installation ist die Einrichtung des fun_plug in der Version 0.5, welche <a href="/nas/"
    title="hier" 
   >
  hier</a> für verschiedene Geräte zu finden ist. Für alle Listings in diesem Beitrag gilt: Wenn man auf &ldquo;Plain Text&rdquo; klickt, gehts kopieren leichter ;) Und wenn Pfade abgeändert werden sollen, bitte selbstständig anpassen.</p>
<p>Zunächst muss man mein <a href="/2146/ulis-paket-repository-fuer-das-conceptronic-ch3snas-bzw-d-link-dns-323/"
    title="Repository" 
   >
  Repository</a> wie gewohnt synchronisieren. Anschließend müssen mindestens <code>curl</code>, <code>mysql</code>, <code>php</code> und <code>lighttpd</code> aus meinem Repository installiert werden. Fonz&rsquo; Repository sollte sowieso komplett installiert sein, hier muss man aber auf jeden Fall <code>libiconv</code> installiert haben.</p>
<p>Wenn man (so wie im <a href="/1426/fun_plug-05-auf-dem-conceptronic-ch3snas-bzw-d-link-dns-323-installieren/"
    title="ffp0.5-Tutorial" 
   >
  ffp0.5-Tutorial</a> beschrieben) bereits früher einmal das PHP von fonz installiert hat, so muss man dieses mittels &ldquo;<code>funpkg -u</code>&rdquo; nun upgraden.</p>
<p>Normalerweise wird man die Pakete wie folgt installieren (lighttpd ist hierbei auf <strong>-u</strong>, also update gestellt, da dieser vermutlich schon installiert ist):</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span><span class="lnt">5
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">funpkg -i /ffp/pkg/additional/*/mysql-*.tgz
</span></span><span class="line"><span class="cl">funpkg -i /ffp/pkg/additional/*/curl-*.tgz
</span></span><span class="line"><span class="cl">funpkg -i /ffp/pkg/additional/*/php-*.tgz
</span></span><span class="line"><span class="cl">funpkg -u /ffp/pkg/additional/*/lighttpd-*.tgz
</span></span><span class="line"><span class="cl">funpkg -i /ffp/pkg/packages/libiconv-*.tgz
</span></span></code></pre></td></tr></table>
</div>
</div><p>Alle Webdienste werden in Zukunft das Verzeichnis <code>/srv/</code> als Datenablageort nutzen. Da es unklug wäre, diese Speicherort auf dem kleinen RAM des NAS zu erzeugen, werden wir nun erstmal einen Link zu einem Verzeichnis auf der Festplatte oder dem USB-Stick erstellen. Dazu öffnet man die Datei <code>/ffp/etc/fun_plug.init</code> und fügt am Ende folgendes ein:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="c1"># create custom link to the server-folder</span>
</span></span><span class="line"><span class="cl">ln -s /ffp/opt/srv/ /srv
</span></span></code></pre></td></tr></table>
</div>
</div><p>Den letzten Befehl führen wir nun auch gleich auf der Konsole aus, damit der Link erstellt wird. Zunächst erstellen wir jedoch das Verlinkte Verzeichnis:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">mkdir -p /ffp/opt/srv/
</span></span><span class="line"><span class="cl">ln -s /ffp/opt/srv/ /srv
</span></span></code></pre></td></tr></table>
</div>
</div><p>Der Webserver lighttpd muss noch konfiguriert werden, einige Configuration-Files werden bereits mitgeliefert. Für das D-Link DNS-320/DNS-325 gibt es ein besonderes File, bitte das folgende in diesem Falle überspringen und beim nächsten Schritt weitermachen:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">cp /ffp/etc/examples/lighttpd.conf-with-php /ffp/etc/lighttpd.conf
</span></span></code></pre></td></tr></table>
</div>
</div><p>Wie bereits angesprochen braucht das DNS-320/DNS-325 ein besonderes Config-File, da bei diesem NAS der interne Webserver ebenfalls lighttpd ist. Damit sich diese nicht in die Quere kommen muss man den internen stoppen und kann dann den FFP-lighttpd starten. Das folgende Configfile macht dann die Weboberfläche des NAS auf Port 81 verfügbar, sodass man darauf weiterhin arbeiten kann:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">cp /ffp/etc/examples/lighttpd.conf-dns320 /ffp/etc/lighttpd.conf
</span></span></code></pre></td></tr></table>
</div>
</div><p>Damit php auch weiß, was erlaubt oder verboten ist, muss eine php.ini im Verzeichnis /ffp/etc/ liegen:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">cp /ffp/etc/examples/php.ini-wolfuli /ffp/etc/php.ini
</span></span></code></pre></td></tr></table>
</div>
</div><p>Und die my.cnf von MySQL darf natürlich nicht fehlen:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">cp /ffp/etc/examples/mysql/my-small.cnf /ffp/etc/my.cnf
</span></span></code></pre></td></tr></table>
</div>
</div><p>Nun befinden sich die drei wichtigen Dateien php.ini (Konfiguration von PHP), lighttpd.conf (Konfiguration für den Webserver) sowie my.cnf (Konfiguration des MySQL-Servers) im Verzeichnis <code>/ffp/etc/</code>. Prinzipiell sollten alle Configs mal durchgesehen werden, ob die Werte so okay sind.</p>
<p>Der Webroot des Webservers ist direkt auf <code>/srv/www/</code> gelegt, dort muss man nun die entsprechenden Verzeichnisse erstellen:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">mkdir -p /srv/tmp/mysql/
</span></span><span class="line"><span class="cl">mkdir -p /srv/www/logs/
</span></span><span class="line"><span class="cl">mkdir -p /srv/www/pages/
</span></span><span class="line"><span class="cl">mkdir -p /srv/mysql/
</span></span></code></pre></td></tr></table>
</div>
</div><p>Die MySQL-Datenbank muss noch initialisiert werden mittels der folgenden Befehle:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">mysql_install_db
</span></span><span class="line"><span class="cl">sh /ffp/start/mysqld.sh start
</span></span><span class="line"><span class="cl">/ffp/bin/mysql_secure_installation
</span></span></code></pre></td></tr></table>
</div>
</div><p>Dort wird nun nach dem Passwort gefragt: &ldquo;<code>Enter current password for root (enter for none):</code>&rdquo; Bei einer neuen Installation ist dieses einfach leer!</p>
<p>Nun kann man den Webserver mal starten, der folgende Befehl ist jedoch nur für alle NAS ausser dem DNS-320/DNS-325 gültig:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sh /ffp/start/lighttpd.sh start
</span></span></code></pre></td></tr></table>
</div>
</div><p>Für das DNS-320/DNS-325 muss der interne Webserver erst abgeschalten werden, was die Datei &ldquo;kickwebs_dns320.sh&rdquo; macht:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sh /ffp/start/kickwebs_dns320.sh start
</span></span><span class="line"><span class="cl">sh /ffp/start/lighttpd.sh start
</span></span></code></pre></td></tr></table>
</div>
</div><p>Sollte alles glatt gehen, so kann man die Pakete im fun_plug dauerhaft aktivieren:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">chmod a+x /ffp/start/lighttpd.sh
</span></span><span class="line"><span class="cl">chmod a+x /ffp/start/mysqld.sh
</span></span></code></pre></td></tr></table>
</div>
</div><p>Hat man das DNS-320/DNS-325 so ist zusätzlich dieser Befehl auszuführen:
chmod a+x /ffp/start/kickwebs_dns320.sh</p>
<p>Kleiner Hinweis am Rand für alle NAS <strong>ausser dem DNS-320</strong>: Der Webserver startet bis jetzt auf Port 8080. Möchte man diesen auf Port 80 (also den regulären HTTP-Port) legen, so muss man folgende Befehle ausführen:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sed -i <span class="s1">&#39;/server.port/ s/^/#/&#39;</span> /ffp/etc/lighttpd.conf
</span></span><span class="line"><span class="cl">chmod a+x /ffp/start/kickwebs.sh
</span></span></code></pre></td></tr></table>
</div>
</div><p>Dies bewirkt, dass der interne Webserver für die Weboberfläche gekillt wird, anschließend startet lighttpd und legt sich auf Port 80. Der interne Webserver ist ein paar Minuten später dann auf Port 81 wieder verfügbar.</p>
<p>Standardmäßig sind in meiner PHP.ini derzeit die untenstehenden Extensions aktiviert. Danke an <a href="/1640/phpmyadmin-auf-dem-conceptronic-ch3snas-bzw-d-link-dns-323-installieren/#comment-11500#comment-11500"
    title="Peter" 
   >
  Peter</a> für den Hinweis!</p>
<p>Einzelne Extensions kann man problemlos auch deaktivieren oder eventuell auch neue hinzufügen (bitte per Kommentar melden, wenn eine fehlt!). Welche momentan überhaupt verfügbar sind, bekommt man mittels &ldquo;<code>ls -al /ffp/lib/php/extensions/no-debug-non-zts-20060613/</code>&rdquo; heraus. Dann sucht man den Punkt &ldquo;Dynamic Extensions&rdquo; in der /ffp/etc/php.ini und kommentiert dort die Extensions ein oder aus. Beispielhaft hier mbstring aktiviert:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nv">extension</span><span class="o">=</span>mbstring.so
</span></span></code></pre></td></tr></table>
</div>
</div><p>Momentan sind folgende verfügbar und aktiviert:</p>
<blockquote>
<p><code>calendar ctype ftp gd mbstring mysql pdo pdo_mysql pdo_sqlite sqlite tokenizer zlib</code></p>
</blockquote>
<h2 id="changelog-des-eintrags">Changelog des Eintrags</h2>
<h3 id="09102008---0130">09.10.2008 - 01:30</h3>
<ul>
<li>Update: Umstieg auf fonz&rsquo; Pakete.</li>
<li>Umstellung des Webroots auf /srv/</li>
<li>Cleanup der php.ini</li>
<li>Anpassung aller Pfade</li>
</ul>
<h3 id="07012011---0040">07.01.2011 - 00:40</h3>
<ul>
<li>Update: Umstieg auf meine Pakete.</li>
<li>Anpassungen für DNS-320</li>
<li>Cleanup mit direkter Paketierung meiner php.ini</li>
</ul>
<h3 id="16022011---0040">16.02.2011 - 00:40</h3>
<ul>
<li>Anpassungen für DNS-325</li>
<li>Änderung des Pfads auf /ffp/opt/srv/ um Festplattenpfad-Konflikte zu vermeiden</li>
</ul>
]]></content:encoded>
    </item>
    <item>
      <title>Test und Review des D-Link DNS-320 - Auspacken und erste Bilder -  Teil 2</title>
      
      
      <link>https://wolf-u.li/test-und-review-des-d-link-dns-320-auspacken-und-erste-bilder-teil-2/</link>
      <pubDate>Sat, 18 Dec 2010 15:30:59 +1800</pubDate>
      <guid>https://wolf-u.li/test-und-review-des-d-link-dns-320-auspacken-und-erste-bilder-teil-2/</guid>
      <description>&lt;p&gt;Wie bereits im &lt;a href=&#34;https://wolf-u.li/3767/test-und-review-des-d-link-dns-320-technische-daten-teil-1/&#34;
    title=&#34;vorhergehenden Beitrag&#34; 
   &gt;
  vorhergehenden Beitrag&lt;/a&gt; beschrieben habe, habe ich ein neues NAS, das &lt;link rel=dns-prefetch href=//www.amazon.de /&gt; &lt;a href=&#34;http://www.amazon.de/dp/B004AIWOXY?tag=lebendeswolfuli-21&#34;
    title=&#34;D-Link DNS-320&#34; 
     target=&#34;_blank&#34; rel=&#34;nofollow noopener noreferrer&#34; &gt;
  D-Link DNS-320&amp;nbsp;&lt;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; class=&#34;icon&#34; aria-hidden=&#34;true&#34; focusable=&#34;false&#34; viewBox=&#34;0 -128 512 640&#34;&gt;
    &lt;path d=&#34;M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z&#34;/&gt;
  &lt;/svg&gt;&lt;/a&gt; bei mir stehen, welches ich gerade ausgepackt habe:&lt;/p&gt;</description>
      
         <content:encoded><![CDATA[<p>Wie bereits im <a href="/3767/test-und-review-des-d-link-dns-320-technische-daten-teil-1/"
    title="vorhergehenden Beitrag" 
   >
  vorhergehenden Beitrag</a> beschrieben habe, habe ich ein neues NAS, das <link rel=dns-prefetch href=//www.amazon.de /> <a href="http://www.amazon.de/dp/B004AIWOXY?tag=lebendeswolfuli-21"
    title="D-Link DNS-320" 
     target="_blank" rel="nofollow noopener noreferrer" >
  D-Link DNS-320&nbsp;<svg xmlns="http://www.w3.org/2000/svg" class="icon" aria-hidden="true" focusable="false" viewBox="0 -128 512 640">
    <path d="M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z"/>
  </svg></a> bei mir stehen, welches ich gerade ausgepackt habe:</p>
<p><img src="/upload/2010/12/3765-D-Link-DNS-320-01.webp" alt="D-Link DNS-320" loading="lazy" title="D-Link DNS-320">
<img src="/upload/2010/12/3765-D-Link-DNS-320-02.webp" alt="D-Link DNS-320" loading="lazy" title="DNS-320 02">
Nach dem Auspacken des NAS habe ich es gleich mal mit Festplatten befüllt. Dazu muss der Deckel abgenommen werden, die Festplatten werden von oben in das NAS geschoben. Die Festplatten klemmen, wenn &ldquo;unten&rdquo; angekommen, wirklich gut und wackeln nicht im Gehäuse, was unnötige Vibrationen ausschließt.</p>
<p><img src="/upload/2010/12/3765-D-Link-DNS-320-03.webp" alt="D-Link DNS-320" loading="lazy" title="DNS-320 03">
<img src="/upload/2010/12/3765-D-Link-DNS-320-04.webp" alt="D-Link DNS-320" loading="lazy" title="DNS-320 04">
<img src="/upload/2010/12/3765-D-Link-DNS-320-05.webp" alt="D-Link DNS-320" loading="lazy" title="DNS-320 05"></p>
<p>Ein nettes Detail ist mir beim &ldquo;Einfüllen&rdquo; aufgefallen, die Festplattenschächte sind beschriftet, sodass es erkennbar ist, welche Festplatte man in welchen Schacht gesteckt hat. Wer übrigens den USB-Port sucht, der wird an der Front des NAS fündig. Hinter einer Klappe versteckt sich dieser zusammen mit dem USB-Copy-Knopf. Letzterer Erlaubt das Kopieren des USB-Stick auf das NAS. Möchte man den USB-Stick wieder abziehen, so muss man den Knopf 5 Sekunden gedrückt halten (das System führt dann den umount durch).</p>
<p><img src="/upload/2010/12/3765-D-Link-DNS-320-06.webp" alt="D-Link DNS-320" loading="lazy" title="DNS-320 06">
<img src="/upload/2010/12/3765-D-Link-DNS-320-07.webp" alt="D-Link DNS-320" loading="lazy" title="DNS-320 07"></p>
<p><a href="/3779/installation-des-fonz-fun_plug-0-5-auf-dem-d-link-dns-320-sharecenter-pulse/"
    title="Weiter zur Installation des fun_plug 0.5" 
   >
  Weiter zur Installation des fun_plug 0.5</a></p>
]]></content:encoded>
    </item>
    <item>
      <title>Test und Review des D-Link DNS-320 - Technische Daten - Teil 1</title>
      
      
      <link>https://wolf-u.li/test-und-review-des-d-link-dns-320-technische-daten-teil-1/</link>
      <pubDate>Sat, 18 Dec 2010 15:28:41 +1800</pubDate>
      <guid>https://wolf-u.li/test-und-review-des-d-link-dns-320-technische-daten-teil-1/</guid>
      <description>&lt;p&gt;&lt;img src=&#34;https://wolf-u.li/upload/2010/12/3765-D-Link-DNS-320-01.webp&#34; alt=&#34;D-Link DNS-320&#34; loading=&#34;lazy&#34; title=&#34;D-Link DNS-320&#34;&gt;&lt;/p&gt;
&lt;p&gt;Vor einigen Tagen hat sich ein neues NAS bei mir eingefunden, das &lt;link rel=dns-prefetch href=//www.amazon.de /&gt; &lt;a href=&#34;http://www.amazon.de/dp/B004AIWOXY?tag=lebendeswolfuli-21&#34;
    title=&#34;D-Link DNS-320&#34; 
     target=&#34;_blank&#34; rel=&#34;nofollow noopener noreferrer&#34; &gt;
  D-Link DNS-320&amp;nbsp;&lt;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; class=&#34;icon&#34; aria-hidden=&#34;true&#34; focusable=&#34;false&#34; viewBox=&#34;0 -128 512 640&#34;&gt;
    &lt;path d=&#34;M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z&#34;/&gt;
  &lt;/svg&gt;&lt;/a&gt;. Im folgenden Beitrag zeige ich kurz die technischen Daten, in einem &lt;a href=&#34;https://wolf-u.li/3765/test-und-review-des-d-link-dns-320-auspacken-und-erste-bilder-teil-2/&#34;
    title=&#34;weiteren Beitrag&#34; 
   &gt;
  weiteren Beitrag&lt;/a&gt; gehe ich auf das Auspacken des Geräts ein.&lt;/p&gt;</description>
      
         <content:encoded><![CDATA[<p><img src="/upload/2010/12/3765-D-Link-DNS-320-01.webp" alt="D-Link DNS-320" loading="lazy" title="D-Link DNS-320"></p>
<p>Vor einigen Tagen hat sich ein neues NAS bei mir eingefunden, das <link rel=dns-prefetch href=//www.amazon.de /> <a href="http://www.amazon.de/dp/B004AIWOXY?tag=lebendeswolfuli-21"
    title="D-Link DNS-320" 
     target="_blank" rel="nofollow noopener noreferrer" >
  D-Link DNS-320&nbsp;<svg xmlns="http://www.w3.org/2000/svg" class="icon" aria-hidden="true" focusable="false" viewBox="0 -128 512 640">
    <path d="M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z"/>
  </svg></a>. Im folgenden Beitrag zeige ich kurz die technischen Daten, in einem <a href="/3765/test-und-review-des-d-link-dns-320-auspacken-und-erste-bilder-teil-2/"
    title="weiteren Beitrag" 
   >
  weiteren Beitrag</a> gehe ich auf das Auspacken des Geräts ein.</p>
<p>Es fasst intern zwei 3,5&quot; SATA-Festplatten mit derzeit maximal 2TB/Festplatte und kann diese in den üblichen Konfigurationen (Single/JBOD/RAID0/RAID1) konfigurieren. Neu ist, dass EXT3 standardmäßig als Dateisystem verwendet wird, was die Datensicherheit im Falle einer abrupten Beendung des Systems deutlich verbessert. Interessant ist auch die Option der &ldquo;RAID-Migration&rdquo;, was die Migration von NON-RAID auf RAID1 ermöglicht. Sehr interessant, werde ich ausprobieren. Zusätzlich wurde Scandisk und S.M.A.R.T. mit in die Firmware integriert, die Tests lassen sich sogar regelmäßig ausführen (mit Ergebnis per Mail).</p>
<p>Die mitgelieferte Firmware ist sowieso recht umfangreich. Neben dem üblichen Samba-Server, welche die Konfiguration von 64 Usern, 10 Gruppen, 64 Freigaben und 64 gleichzeitigen Verbindungen erlaubt, sind auch weitere Server an Board:</p>
<ul>
<li>NFS-Server</li>
<li>AFP-Server</li>
<li>FTP-Server (inklusive SSL/TLS und FXP-Unterstüzung)</li>
<li>UPNP-Server</li>
<li>iTunes-Server</li>
<li>Web-Server</li>
<li>MySQL-Server</li>
</ul>
<p>Zudem ist wieder ein Bittorrent-Client an Board. Auch der Downloader, welcher nun ordentliches Scheduling und viele Sonderoptionen bietet, ist wieder mit eingebaut.</p>
<p>Zum Thema Stromverbrauch gibt D-Link für den Schlafmodus eine Aufnahme von 8,2Watt, für den normalen Betrieb eine Aufnahme von 15,7Watt an. Hierzu kommen dann noch die Daten der Festplatten, da muss man wohl noch einige Watt (je nach Platten) drauf rechnen. Versorgt wird das NAS über ein kleines externes Netzteil, welches bei 12V stolze 4A ausgibt.</p>
<p>Betrieben werden sollte das NAS bei 0-40°C mit 5-90% Luftfreuchtigkeit, die Lagerung ist bei -20-70°C erlaubt. Das ist wichtig für alle die das NAS auf dem Dachboden oder im Keller stehen haben :)</p>
<p>Die ARM-CPU ist mit 800Mhz ein Renner, dem dann 128MB Ram zur Seite stehen. Details aus <link rel=dns-prefetch href=//nas-tweaks.net /> <a href="https://nas-tweaks.net/108/output-of-proccpuinfo-on-the-d-link-dns-320/"
    title="/proc/cpuinfo" 
     target="_blank" rel="nofollow noopener noreferrer" >
  /proc/cpuinfo&nbsp;<svg xmlns="http://www.w3.org/2000/svg" class="icon" aria-hidden="true" focusable="false" viewBox="0 -128 512 640">
    <path d="M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z"/>
  </svg></a>, der <link rel=dns-prefetch href=//nas-tweaks.net /> <a href="https://nas-tweaks.net/115/output-of-procmeminfo-on-the-d-link-dns-320/"
    title="/proc/meminfo" 
     target="_blank" rel="nofollow noopener noreferrer" >
  /proc/meminfo&nbsp;<svg xmlns="http://www.w3.org/2000/svg" class="icon" aria-hidden="true" focusable="false" viewBox="0 -128 512 640">
    <path d="M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z"/>
  </svg></a> und der <link rel=dns-prefetch href=//nas-tweaks.net /> <a href="https://nas-tweaks.net/116/output-of-dmesg-on-the-d-link-dns-320/"
    title="dmesg" 
     target="_blank" rel="nofollow noopener noreferrer" >
  dmesg&nbsp;<svg xmlns="http://www.w3.org/2000/svg" class="icon" aria-hidden="true" focusable="false" viewBox="0 -128 512 640">
    <path d="M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z"/>
  </svg></a>-Ausgabe gibts bei meiner englischsprachigen Seite NAS-Tweaks.net.</p>
<p><a href="/3765/test-und-review-des-d-link-dns-320-auspacken-und-erste-bilder-teil-2/"
    title="Weiter zu den Bildern" 
   >
  Weiter zu den Bildern</a></p>
]]></content:encoded>
    </item>
    <item>
      <title>Rewrite Rules für das SimpleMachinesForum mit dem PrettyUrls-Plugin auf dem Webserver nginx</title>
      
      
      <link>https://wolf-u.li/rewrite-rules-fuer-das-simplemachinesforum-mit-dem-prettyurls-plugin-auf-dem-webserver-nginx/</link>
      <pubDate>Sat, 15 Aug 2009 16:06:17 +1500</pubDate>
      <guid>https://wolf-u.li/rewrite-rules-fuer-das-simplemachinesforum-mit-dem-prettyurls-plugin-auf-dem-webserver-nginx/</guid>
      <description>&lt;p&gt;Dieser Artikel ist Teil einer Reihe zum Webserver nginx.
Schau dir auch die anderen Artikel an: &lt;a href=&#34;https://wolf-u.li/3137/leitartikel-zur-konfiguration-und-installation-des-webservers-nginx/&#34;
    title=&#34;Zum Leitartikel&#34; 
   &gt;
  Zum Leitartikel&lt;/a&gt;
Nach der Installation von nginx stellte ich mich der Herausforderung, alle meine &lt;link rel=dns-prefetch href=//simplemachines.org /&gt; &lt;a href=&#34;http://simplemachines.org/&#34;
    title=&#34;Simplemachines&#34; 
     target=&#34;_blank&#34; rel=&#34;nofollow noopener noreferrer&#34; &gt;
  Simplemachines&amp;nbsp;&lt;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; class=&#34;icon&#34; aria-hidden=&#34;true&#34; focusable=&#34;false&#34; viewBox=&#34;0 -128 512 640&#34;&gt;
    &lt;path d=&#34;M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z&#34;/&gt;
  &lt;/svg&gt;&lt;/a&gt;-Foren auf Nginx umzuziehen. In einigen hatte ich das &lt;link rel=dns-prefetch href=//custom.simplemachines.org /&gt; &lt;a href=&#34;http://custom.simplemachines.org/mods/index.php?mod=636&#34;
    title=&#34;PrettyUrls&#34; 
     target=&#34;_blank&#34; rel=&#34;nofollow noopener noreferrer&#34; &gt;
  PrettyUrls&amp;nbsp;&lt;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; class=&#34;icon&#34; aria-hidden=&#34;true&#34; focusable=&#34;false&#34; viewBox=&#34;0 -128 512 640&#34;&gt;
    &lt;path d=&#34;M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z&#34;/&gt;
  &lt;/svg&gt;&lt;/a&gt;-Plugin installiert, da es einerseits schöner und sprechender aussieht und andererseits durch die Suchmaschinen wohl besser akzeptiert wird. Diese wollte ich natürlich auch weiterhin nutzen. Ich fand zwar eine Seite, die schon Rewrite-Regeln anbot, jedoch waren das noch nicht ausreichend viele, da ich zusätzlich noch für alle Aktionen die schönen URLs aktiviert hatte.&lt;/p&gt;</description>
      
         <content:encoded><![CDATA[<p>Dieser Artikel ist Teil einer Reihe zum Webserver nginx.
Schau dir auch die anderen Artikel an: <a href="/3137/leitartikel-zur-konfiguration-und-installation-des-webservers-nginx/"
    title="Zum Leitartikel" 
   >
  Zum Leitartikel</a>
Nach der Installation von nginx stellte ich mich der Herausforderung, alle meine <link rel=dns-prefetch href=//simplemachines.org /> <a href="http://simplemachines.org/"
    title="Simplemachines" 
     target="_blank" rel="nofollow noopener noreferrer" >
  Simplemachines&nbsp;<svg xmlns="http://www.w3.org/2000/svg" class="icon" aria-hidden="true" focusable="false" viewBox="0 -128 512 640">
    <path d="M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z"/>
  </svg></a>-Foren auf Nginx umzuziehen. In einigen hatte ich das <link rel=dns-prefetch href=//custom.simplemachines.org /> <a href="http://custom.simplemachines.org/mods/index.php?mod=636"
    title="PrettyUrls" 
     target="_blank" rel="nofollow noopener noreferrer" >
  PrettyUrls&nbsp;<svg xmlns="http://www.w3.org/2000/svg" class="icon" aria-hidden="true" focusable="false" viewBox="0 -128 512 640">
    <path d="M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z"/>
  </svg></a>-Plugin installiert, da es einerseits schöner und sprechender aussieht und andererseits durch die Suchmaschinen wohl besser akzeptiert wird. Diese wollte ich natürlich auch weiterhin nutzen. Ich fand zwar eine Seite, die schon Rewrite-Regeln anbot, jedoch waren das noch nicht ausreichend viele, da ich zusätzlich noch für alle Aktionen die schönen URLs aktiviert hatte.</p>
<p>Meine finalen Regeln:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt"> 1
</span><span class="lnt"> 2
</span><span class="lnt"> 3
</span><span class="lnt"> 4
</span><span class="lnt"> 5
</span><span class="lnt"> 6
</span><span class="lnt"> 7
</span><span class="lnt"> 8
</span><span class="lnt"> 9
</span><span class="lnt">10
</span><span class="lnt">11
</span><span class="lnt">12
</span><span class="lnt">13
</span><span class="lnt">14
</span><span class="lnt">15
</span><span class="lnt">16
</span><span class="lnt">17
</span><span class="lnt">18
</span><span class="lnt">19
</span><span class="lnt">20
</span><span class="lnt">21
</span><span class="lnt">22
</span><span class="lnt">23
</span><span class="lnt">24
</span><span class="lnt">25
</span><span class="lnt">26
</span><span class="lnt">27
</span><span class="lnt">28
</span><span class="lnt">29
</span><span class="lnt">30
</span><span class="lnt">31
</span><span class="lnt">32
</span><span class="lnt">33
</span><span class="lnt">34
</span><span class="lnt">35
</span><span class="lnt">36
</span><span class="lnt">37
</span><span class="lnt">38
</span><span class="lnt">39
</span><span class="lnt">40
</span><span class="lnt">41
</span><span class="lnt">42
</span><span class="lnt">43
</span><span class="lnt">44
</span><span class="lnt">45
</span><span class="lnt">46
</span><span class="lnt">47
</span><span class="lnt">48
</span><span class="lnt">49
</span><span class="lnt">50
</span><span class="lnt">51
</span><span class="lnt">52
</span><span class="lnt">53
</span><span class="lnt">54
</span><span class="lnt">55
</span><span class="lnt">56
</span><span class="lnt">57
</span><span class="lnt">58
</span><span class="lnt">59
</span><span class="lnt">60
</span><span class="lnt">61
</span><span class="lnt">62
</span><span class="lnt">63
</span><span class="lnt">64
</span><span class="lnt">65
</span><span class="lnt">66
</span><span class="lnt">67
</span><span class="lnt">68
</span><span class="lnt">69
</span><span class="lnt">70
</span><span class="lnt">71
</span><span class="lnt">72
</span><span class="lnt">73
</span><span class="lnt">74
</span><span class="lnt">75
</span><span class="lnt">76
</span><span class="lnt">77
</span><span class="lnt">78
</span><span class="lnt">79
</span><span class="lnt">80
</span><span class="lnt">81
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">server <span class="o">{</span>
</span></span><span class="line"><span class="cl"> listen 80<span class="p">;</span>
</span></span><span class="line"><span class="cl"> server_name forum.example.com *.forum.example.com<span class="p">;</span>
</span></span><span class="line"><span class="cl"> error_log /var/log/nginx/forum.example.com.log warn<span class="p">;</span>
</span></span><span class="line"><span class="cl"> root /var/www/forum.example.com/<span class="p">;</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"> location / <span class="o">{</span>
</span></span><span class="line"><span class="cl"> index index.php<span class="p">;</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"> <span class="c1"># Rules for: actions</span>
</span></span><span class="line"><span class="cl"> rewrite ^/<span class="o">(</span>activate<span class="p">|</span>admin<span class="p">|</span>announce<span class="p">|</span>ban<span class="p">|</span>boardrecount<span class="p">|</span>buddy<span class="p">|</span>calendar<span class="p">|</span>cleanperms<span class="o">)</span>/?$ /index.php?pretty%3Baction<span class="o">=</span><span class="nv">$1</span> last<span class="p">;</span>
</span></span><span class="line"><span class="cl"> rewrite ^/<span class="o">(</span>collapse<span class="p">|</span>convertentities<span class="p">|</span>convertutf8<span class="p">|</span>coppa<span class="p">|</span>deletemsg<span class="p">|</span>detailedversion<span class="p">|</span>display<span class="p">|</span>dlattach<span class="o">)</span>/?$ /index.php?pretty%3Baction<span class="o">=</span><span class="nv">$1</span> last<span class="p">;</span>
</span></span><span class="line"><span class="cl"> rewrite ^/<span class="o">(</span>dumpdb<span class="p">|</span>editpoll<span class="p">|</span>editpoll2<span class="p">|</span>featuresettings<span class="p">|</span>featuresettings2<span class="p">|</span>findmember<span class="p">|</span>help<span class="p">|</span>helpadmin<span class="o">)</span>/?$ ./index.php?pretty%3Baction<span class="o">=</span><span class="nv">$1</span> last<span class="p">;</span>
</span></span><span class="line"><span class="cl"> rewrite ^/<span class="o">(</span>im<span class="p">|</span>jsoption<span class="p">|</span>jsmodify<span class="p">|</span>lock<span class="p">|</span>lockVoting<span class="p">|</span>login<span class="p">|</span>login2<span class="p">|</span><span class="nb">logout</span><span class="o">)</span>/?$ ./index.php?pretty%3Baction<span class="o">=</span><span class="nv">$1</span> last<span class="p">;</span>
</span></span><span class="line"><span class="cl"> rewrite ^/<span class="o">(</span>maintain<span class="p">|</span>manageattachments<span class="p">|</span>manageboards<span class="p">|</span>managecalendar<span class="p">|</span>managesearch<span class="p">|</span>markasread<span class="p">|</span>membergroups<span class="p">|</span>mergetopics<span class="o">)</span>/?$ ./index.php?pretty%3Baction<span class="o">=</span><span class="nv">$1</span> last<span class="p">;</span>
</span></span><span class="line"><span class="cl"> rewrite ^/<span class="o">(</span>mlist<span class="p">|</span>modifycat<span class="p">|</span>modifykarma<span class="p">|</span>modlog<span class="p">|</span>movetopic<span class="p">|</span>movetopic2<span class="p">|</span>news<span class="p">|</span>notify<span class="o">)</span>/?$ ./index.php?pretty%3Baction<span class="o">=</span><span class="nv">$1</span> last<span class="p">;</span>
</span></span><span class="line"><span class="cl"> rewrite ^/<span class="o">(</span>notifyboard<span class="p">|</span>optimizetables<span class="p">|</span>packageget<span class="p">|</span>packages<span class="p">|</span>permissions<span class="p">|</span>pgdownload<span class="p">|</span>pm<span class="p">|</span>post<span class="o">)</span>/?$ ./index.php?pretty%3Baction<span class="o">=</span><span class="nv">$1</span> last<span class="p">;</span>
</span></span><span class="line"><span class="cl"> rewrite ^/<span class="o">(</span>post2<span class="p">|</span>postsettings<span class="p">|</span>printpage<span class="p">|</span>profile<span class="p">|</span>profile2<span class="p">|</span>quotefast<span class="p">|</span>quickmod<span class="p">|</span>quickmod2<span class="o">)</span>/?$ ./index.php?pretty%3Baction<span class="o">=</span><span class="nv">$1</span> last<span class="p">;</span>
</span></span><span class="line"><span class="cl"> rewrite ^/<span class="o">(</span>recent<span class="p">|</span>regcenter<span class="p">|</span>register<span class="p">|</span>register2<span class="p">|</span>reminder<span class="p">|</span>removetopic2<span class="p">|</span>removeoldtopics2<span class="p">|</span>removepoll<span class="o">)</span>/?$ ./index.php?pretty%3Baction<span class="o">=</span><span class="nv">$1</span> last<span class="p">;</span>
</span></span><span class="line"><span class="cl"> rewrite ^/<span class="o">(</span>repairboards<span class="p">|</span>reporttm<span class="p">|</span>reports<span class="p">|</span>requestmembers<span class="p">|</span>search<span class="p">|</span>search2<span class="p">|</span>sendtopic<span class="p">|</span>serversettings<span class="o">)</span>/?$ ./index.php?pretty%3Baction<span class="o">=</span><span class="nv">$1</span> last<span class="p">;</span>
</span></span><span class="line"><span class="cl"> rewrite ^/<span class="o">(</span>serversettings2<span class="p">|</span>smileys<span class="p">|</span>smstats<span class="p">|</span>spellcheck<span class="p">|</span>splittopics<span class="p">|</span>stats<span class="p">|</span>sticky<span class="p">|</span>theme<span class="o">)</span>/?$ ./index.php?pretty%3Baction<span class="o">=</span><span class="nv">$1</span> last<span class="p">;</span>
</span></span><span class="line"><span class="cl"> rewrite ^/<span class="o">(</span>trackip<span class="p">|</span>about:mozilla<span class="p">|</span>about:unknown<span class="p">|</span>unread<span class="p">|</span>unreadreplies<span class="p">|</span>viewErrorLog<span class="p">|</span>viewmembers<span class="p">|</span>viewprofile<span class="o">)</span>/?$ ./index.php?pretty%3Baction<span class="o">=</span><span class="nv">$1</span> last<span class="p">;</span>
</span></span><span class="line"><span class="cl"> rewrite ^/<span class="o">(</span>verificationcode<span class="p">|</span>vote<span class="p">|</span>viewquery<span class="p">|</span>who<span class="p">|</span><span class="se">\.</span>xml<span class="o">)</span>/?$ ./index.php?pretty%3Baction<span class="o">=</span><span class="nv">$1</span> last<span class="p">;</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"> <span class="c1"># Rules for: boards</span>
</span></span><span class="line"><span class="cl"> rewrite ^/<span class="o">([</span>-_!~*<span class="s1">&#39;()$a-zA-Z0-9]+)/[0-9]?/?$ /index.php?pretty%3Bboard=$1.0 last;
</span></span></span><span class="line"><span class="cl"><span class="s1"> rewrite ^/([-_!~*&#39;</span><span class="o">()</span><span class="nv">$a</span>-zA-Z0-9<span class="o">]</span>+<span class="o">)</span>/<span class="o">([</span>0-9<span class="o">]</span>*<span class="o">)</span>/<span class="o">[</span>0-9<span class="o">]</span>?/?$ /index.php?pretty%3Bboard<span class="o">=</span><span class="nv">$1</span>.<span class="nv">$2</span> last<span class="p">;</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"> <span class="c1"># Rules for: topics</span>
</span></span><span class="line"><span class="cl"> rewrite ^/<span class="o">([</span>-_!~*<span class="s1">&#39;()$a-zA-Z0-9]+)/([-_!~*&#39;</span><span class="o">()</span><span class="nv">$a</span>-zA-Z0-9<span class="o">]</span>+<span class="o">)</span>/<span class="o">[</span>0-9<span class="o">]</span>?/?$ /index.php?pretty%3Bboard<span class="o">=</span><span class="nv">$1</span>%3Btopic<span class="o">=</span><span class="nv">$2</span>.0 last<span class="p">;</span>
</span></span><span class="line"><span class="cl"> rewrite ^/<span class="o">([</span>-_!~*<span class="s1">&#39;()$a-zA-Z0-9]+)/([-_!~*&#39;</span><span class="o">()</span><span class="nv">$a</span>-zA-Z0-9<span class="o">]</span>+<span class="o">)</span>/<span class="o">([</span>0-9<span class="o">]</span>*<span class="p">|</span>msg<span class="o">[</span>0-9<span class="o">]</span>*<span class="p">|</span>new<span class="o">)</span>/<span class="o">[</span>0-9<span class="o">]</span>?/?$ /index.php?pretty%3Bboard<span class="o">=</span><span class="nv">$2</span>%3Btopic<span class="o">=</span><span class="nv">$2</span>.<span class="nv">$3</span> last<span class="p">;</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"> <span class="c1"># And the sitemap</span>
</span></span><span class="line"><span class="cl"> rewrite ^sitemap.xml$ /index.php?action<span class="o">=</span>sitemap%3Bxml last<span class="p">;</span>
</span></span><span class="line"><span class="cl"> <span class="o">}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"> location ~ <span class="se">\.</span>php$ <span class="o">{</span>
</span></span><span class="line"><span class="cl"> fastcgi_pass 127.0.0.1:1234<span class="p">;</span>
</span></span><span class="line"><span class="cl"> include /etc/nginx/fastcgi_params<span class="p">;</span>
</span></span><span class="line"><span class="cl"> <span class="o">}</span>
</span></span><span class="line"><span class="cl"><span class="o">}</span>server <span class="o">{</span>
</span></span><span class="line"><span class="cl">        listen          80<span class="p">;</span>
</span></span><span class="line"><span class="cl">        server_name     forum.example.com *.forum.example.com<span class="p">;</span>
</span></span><span class="line"><span class="cl">        error_log       /var/log/nginx/forum.example.com.log warn<span class="p">;</span>
</span></span><span class="line"><span class="cl">        root            /var/www/forum.example.com/<span class="p">;</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">        location / <span class="o">{</span>
</span></span><span class="line"><span class="cl">                index           index.php<span class="p">;</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">                <span class="c1"># Rules for: actions</span>
</span></span><span class="line"><span class="cl">                rewrite ^/<span class="o">(</span>activate<span class="p">|</span>admin<span class="p">|</span>announce<span class="p">|</span>ban<span class="p">|</span>boardrecount<span class="p">|</span>buddy<span class="p">|</span>calendar<span class="p">|</span>cleanperms<span class="o">)</span>/?$ /index.php?pretty%3Baction<span class="o">=</span><span class="nv">$1</span> last<span class="p">;</span>
</span></span><span class="line"><span class="cl">                rewrite ^/<span class="o">(</span>collapse<span class="p">|</span>convertentities<span class="p">|</span>convertutf8<span class="p">|</span>coppa<span class="p">|</span>deletemsg<span class="p">|</span>detailedversion<span class="p">|</span>display<span class="p">|</span>dlattach<span class="o">)</span>/?$ /index.php?pretty%3Baction<span class="o">=</span><span class="nv">$1</span> last<span class="p">;</span>
</span></span><span class="line"><span class="cl">                rewrite ^/<span class="o">(</span>dumpdb<span class="p">|</span>editpoll<span class="p">|</span>editpoll2<span class="p">|</span>featuresettings<span class="p">|</span>featuresettings2<span class="p">|</span>findmember<span class="p">|</span>help<span class="p">|</span>helpadmin<span class="o">)</span>/?$ ./index.php?pretty%3Baction<span class="o">=</span><span class="nv">$1</span> last<span class="p">;</span>
</span></span><span class="line"><span class="cl">                rewrite ^/<span class="o">(</span>im<span class="p">|</span>jsoption<span class="p">|</span>jsmodify<span class="p">|</span>lock<span class="p">|</span>lockVoting<span class="p">|</span>login<span class="p">|</span>login2<span class="p">|</span><span class="nb">logout</span><span class="o">)</span>/?$ ./index.php?pretty%3Baction<span class="o">=</span><span class="nv">$1</span> last<span class="p">;</span>
</span></span><span class="line"><span class="cl">                rewrite ^/<span class="o">(</span>maintain<span class="p">|</span>manageattachments<span class="p">|</span>manageboards<span class="p">|</span>managecalendar<span class="p">|</span>managesearch<span class="p">|</span>markasread<span class="p">|</span>membergroups<span class="p">|</span>mergetopics<span class="o">)</span>/?$ ./index.php?pretty%3Baction<span class="o">=</span><span class="nv">$1</span> last<span class="p">;</span>
</span></span><span class="line"><span class="cl">                rewrite ^/<span class="o">(</span>mlist<span class="p">|</span>modifycat<span class="p">|</span>modifykarma<span class="p">|</span>modlog<span class="p">|</span>movetopic<span class="p">|</span>movetopic2<span class="p">|</span>news<span class="p">|</span>notify<span class="o">)</span>/?$ ./index.php?pretty%3Baction<span class="o">=</span><span class="nv">$1</span> last<span class="p">;</span>
</span></span><span class="line"><span class="cl">                rewrite ^/<span class="o">(</span>notifyboard<span class="p">|</span>optimizetables<span class="p">|</span>packageget<span class="p">|</span>packages<span class="p">|</span>permissions<span class="p">|</span>pgdownload<span class="p">|</span>pm<span class="p">|</span>post<span class="o">)</span>/?$ ./index.php?pretty%3Baction<span class="o">=</span><span class="nv">$1</span> last<span class="p">;</span>
</span></span><span class="line"><span class="cl">                rewrite ^/<span class="o">(</span>post2<span class="p">|</span>postsettings<span class="p">|</span>printpage<span class="p">|</span>profile<span class="p">|</span>profile2<span class="p">|</span>quotefast<span class="p">|</span>quickmod<span class="p">|</span>quickmod2<span class="o">)</span>/?$ ./index.php?pretty%3Baction<span class="o">=</span><span class="nv">$1</span> last<span class="p">;</span>
</span></span><span class="line"><span class="cl">                rewrite ^/<span class="o">(</span>recent<span class="p">|</span>regcenter<span class="p">|</span>register<span class="p">|</span>register2<span class="p">|</span>reminder<span class="p">|</span>removetopic2<span class="p">|</span>removeoldtopics2<span class="p">|</span>removepoll<span class="o">)</span>/?$ ./index.php?pretty%3Baction<span class="o">=</span><span class="nv">$1</span> last<span class="p">;</span>
</span></span><span class="line"><span class="cl">                rewrite ^/<span class="o">(</span>repairboards<span class="p">|</span>reporttm<span class="p">|</span>reports<span class="p">|</span>requestmembers<span class="p">|</span>search<span class="p">|</span>search2<span class="p">|</span>sendtopic<span class="p">|</span>serversettings<span class="o">)</span>/?$ ./index.php?pretty%3Baction<span class="o">=</span><span class="nv">$1</span> last<span class="p">;</span>
</span></span><span class="line"><span class="cl">                rewrite ^/<span class="o">(</span>serversettings2<span class="p">|</span>smileys<span class="p">|</span>smstats<span class="p">|</span>spellcheck<span class="p">|</span>splittopics<span class="p">|</span>stats<span class="p">|</span>sticky<span class="p">|</span>theme<span class="o">)</span>/?$ ./index.php?pretty%3Baction<span class="o">=</span><span class="nv">$1</span> last<span class="p">;</span>
</span></span><span class="line"><span class="cl">                rewrite ^/<span class="o">(</span>trackip<span class="p">|</span>about:mozilla<span class="p">|</span>about:unknown<span class="p">|</span>unread<span class="p">|</span>unreadreplies<span class="p">|</span>viewErrorLog<span class="p">|</span>viewmembers<span class="p">|</span>viewprofile<span class="o">)</span>/?$ ./index.php?pretty%3Baction<span class="o">=</span><span class="nv">$1</span> last<span class="p">;</span>
</span></span><span class="line"><span class="cl">                rewrite ^/<span class="o">(</span>verificationcode<span class="p">|</span>vote<span class="p">|</span>viewquery<span class="p">|</span>who<span class="p">|</span><span class="se">\.</span>xml<span class="o">)</span>/?$ ./index.php?pretty%3Baction<span class="o">=</span><span class="nv">$1</span> last<span class="p">;</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">                <span class="c1"># Rules for: boards</span>
</span></span><span class="line"><span class="cl">                rewrite ^/<span class="o">([</span>-_!~*<span class="s1">&#39;()$a-zA-Z0-9]+)/[0-9]?/?$ /index.php?pretty%3Bboard=$1.0 last;
</span></span></span><span class="line"><span class="cl"><span class="s1">                rewrite ^/([-_!~*&#39;</span><span class="o">()</span><span class="nv">$a</span>-zA-Z0-9<span class="o">]</span>+<span class="o">)</span>/<span class="o">([</span>0-9<span class="o">]</span>*<span class="o">)</span>/<span class="o">[</span>0-9<span class="o">]</span>?/?$ /index.php?pretty%3Bboard<span class="o">=</span><span class="nv">$1</span>.<span class="nv">$2</span> last<span class="p">;</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">                <span class="c1"># Rules for: topics</span>
</span></span><span class="line"><span class="cl">                rewrite ^/<span class="o">([</span>-_!~*<span class="s1">&#39;()$a-zA-Z0-9]+)/([-_!~*&#39;</span><span class="o">()</span><span class="nv">$a</span>-zA-Z0-9<span class="o">]</span>+<span class="o">)</span>/<span class="o">[</span>0-9<span class="o">]</span>?/?$ /index.php?pretty%3Bboard<span class="o">=</span><span class="nv">$1</span>%3Btopic<span class="o">=</span><span class="nv">$2</span>.0 last<span class="p">;</span>
</span></span><span class="line"><span class="cl">                rewrite ^/<span class="o">([</span>-_!~*<span class="s1">&#39;()$a-zA-Z0-9]+)/([-_!~*&#39;</span><span class="o">()</span><span class="nv">$a</span>-zA-Z0-9<span class="o">]</span>+<span class="o">)</span>/<span class="o">([</span>0-9<span class="o">]</span>*<span class="p">|</span>msg<span class="o">[</span>0-9<span class="o">]</span>*<span class="p">|</span>new<span class="o">)</span>/<span class="o">[</span>0-9<span class="o">]</span>?/?$ /index.php?pretty%3Bboard<span class="o">=</span><span class="nv">$2</span>%3Btopic<span class="o">=</span><span class="nv">$2</span>.<span class="nv">$3</span> last<span class="p">;</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">                <span class="c1"># And the sitemap</span>
</span></span><span class="line"><span class="cl">                rewrite ^sitemap.xml$ /index.php?action<span class="o">=</span>sitemap%3Bxml last<span class="p">;</span>
</span></span><span class="line"><span class="cl">        <span class="o">}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">        location ~ <span class="se">\.</span>php$ <span class="o">{</span>
</span></span><span class="line"><span class="cl">                fastcgi_pass    127.0.0.1:1234<span class="p">;</span>
</span></span><span class="line"><span class="cl">                include         /etc/nginx/fastcgi_params<span class="p">;</span>
</span></span><span class="line"><span class="cl">        <span class="o">}</span>
</span></span><span class="line"><span class="cl"><span class="o">}</span>
</span></span></code></pre></td></tr></table>
</div>
</div>]]></content:encoded>
    </item>
    <item>
      <title>Inotify Tools - Reaktion auf Dateiänderungen</title>
      
      
      <link>https://wolf-u.li/inotify-tools-reaktion-auf-dateiaenderungen/</link>
      <pubDate>Sun, 15 Feb 2015 14:02:37 +1500</pubDate>
      <guid>https://wolf-u.li/inotify-tools-reaktion-auf-dateiaenderungen/</guid>
      <description>&lt;p&gt;Soeben hatte ich bei einer Entwicklung das Problem, dass ich nach jeder Änderung ein Cache-Directory löschen musste&amp;hellip;nach einer Weile ging es mir auf den Keks und ich habe mich auf die Suche nach einer praktischen Lösung gemacht. Dabei bin ich &lt;link rel=dns-prefetch href=//unix.stackexchange.com /&gt; &lt;a href=&#34;http://unix.stackexchange.com/questions/24952/script-to-monitor-folder-for-new-files&#34;
    title=&#34;hier&#34; 
     target=&#34;_blank&#34; rel=&#34;nofollow noopener noreferrer&#34; &gt;
  hier&amp;nbsp;&lt;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; class=&#34;icon&#34; aria-hidden=&#34;true&#34; focusable=&#34;false&#34; viewBox=&#34;0 -128 512 640&#34;&gt;
    &lt;path d=&#34;M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z&#34;/&gt;
  &lt;/svg&gt;&lt;/a&gt; auf die inotify-tools gestossen.&lt;/p&gt;</description>
      
         <content:encoded><![CDATA[<p>Soeben hatte ich bei einer Entwicklung das Problem, dass ich nach jeder Änderung ein Cache-Directory löschen musste&hellip;nach einer Weile ging es mir auf den Keks und ich habe mich auf die Suche nach einer praktischen Lösung gemacht. Dabei bin ich <link rel=dns-prefetch href=//unix.stackexchange.com /> <a href="http://unix.stackexchange.com/questions/24952/script-to-monitor-folder-for-new-files"
    title="hier" 
     target="_blank" rel="nofollow noopener noreferrer" >
  hier&nbsp;<svg xmlns="http://www.w3.org/2000/svg" class="icon" aria-hidden="true" focusable="false" viewBox="0 -128 512 640">
    <path d="M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z"/>
  </svg></a> auf die inotify-tools gestossen.</p>
<p>Installiert wird das unter debian mittels:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">apt-get install inotify-tools
</span></span></code></pre></td></tr></table>
</div>
</div><p>Und so wird es verwendet:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span><span class="lnt">5
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">inotifywait -r -m /var/www/pages -e create -e modify <span class="p">|</span>
</span></span><span class="line"><span class="cl"> <span class="k">while</span> <span class="nb">read</span> path action file<span class="p">;</span> <span class="k">do</span>
</span></span><span class="line"><span class="cl"> rm -Rf /var/www/temp/*<span class="p">;</span>
</span></span><span class="line"><span class="cl"> <span class="nb">echo</span> <span class="s2">&#34;Cleaned Temp - </span><span class="k">$(</span>date<span class="k">)</span><span class="s2">&#34;</span><span class="p">;</span>
</span></span><span class="line"><span class="cl"> <span class="k">done</span>
</span></span></code></pre></td></tr></table>
</div>
</div><p>Vorsicht an dieser Stelle: Immer drüber nachdenken was genau man löscht und was man erzielen will. Wenn man im obigen Beispiel z.b. /var/www überwacht, braucht man sich nicht zu wundern, dass Temp immer leer ist ;) Temporäre Dateien sind dann natürlich auch auslöser ;)</p>
]]></content:encoded>
    </item>
    <item>
      <title>Konfiguration von MySQL und lighttpd mit PHP unter FFP 0.7</title>
      
      
      <link>https://wolf-u.li/konfiguration-von-mysql-und-lighttpd-mit-php-unter-ffp-0-7/</link>
      <pubDate>Mon, 05 Nov 2012 10:05:20 +0500</pubDate>
      <guid>https://wolf-u.li/konfiguration-von-mysql-und-lighttpd-mit-php-unter-ffp-0-7/</guid>
      <description>&lt;p&gt;&lt;strong&gt;ACHTUNG&lt;/strong&gt; Dieses Tutorial funktioniert derzeit NUR auf Geräten mit &amp;ldquo;arm&amp;rdquo;-Paketen&lt;/p&gt;
&lt;p&gt;Ich wurde nun mehrmals gebeten ein Tutorial zum Aufsetzen von MySQL und lighttpd mit PHP unter FFP 0.7 zu veröffentlichen. Und hier gehts los. Wenn ihr nicht wisst, was diese Software-Produkte sind, dann rate ich euch zum Besuch der Seiten von &lt;link rel=dns-prefetch href=//www.mysql.com /&gt; &lt;a href=&#34;https://www.mysql.com/&#34;
    title=&#34;MySQL&#34; 
     target=&#34;_blank&#34; rel=&#34;nofollow noopener noreferrer&#34; &gt;
  MySQL&amp;nbsp;&lt;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; class=&#34;icon&#34; aria-hidden=&#34;true&#34; focusable=&#34;false&#34; viewBox=&#34;0 -128 512 640&#34;&gt;
    &lt;path d=&#34;M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z&#34;/&gt;
  &lt;/svg&gt;&lt;/a&gt;, &lt;link rel=dns-prefetch href=//www.lighttpd.net /&gt; &lt;a href=&#34;http://www.lighttpd.net/&#34;
    title=&#34;Lighttpd&#34; 
     target=&#34;_blank&#34; rel=&#34;nofollow noopener noreferrer&#34; &gt;
  Lighttpd&amp;nbsp;&lt;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; class=&#34;icon&#34; aria-hidden=&#34;true&#34; focusable=&#34;false&#34; viewBox=&#34;0 -128 512 640&#34;&gt;
    &lt;path d=&#34;M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z&#34;/&gt;
  &lt;/svg&gt;&lt;/a&gt; und &lt;link rel=dns-prefetch href=//php.net /&gt; &lt;a href=&#34;http://php.net/&#34;
    title=&#34;PHP&#34; 
     target=&#34;_blank&#34; rel=&#34;nofollow noopener noreferrer&#34; &gt;
  PHP&amp;nbsp;&lt;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; class=&#34;icon&#34; aria-hidden=&#34;true&#34; focusable=&#34;false&#34; viewBox=&#34;0 -128 512 640&#34;&gt;
    &lt;path d=&#34;M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z&#34;/&gt;
  &lt;/svg&gt;&lt;/a&gt;.&lt;/p&gt;</description>
      
         <content:encoded><![CDATA[<p><strong>ACHTUNG</strong> Dieses Tutorial funktioniert derzeit NUR auf Geräten mit &ldquo;arm&rdquo;-Paketen</p>
<p>Ich wurde nun mehrmals gebeten ein Tutorial zum Aufsetzen von MySQL und lighttpd mit PHP unter FFP 0.7 zu veröffentlichen. Und hier gehts los. Wenn ihr nicht wisst, was diese Software-Produkte sind, dann rate ich euch zum Besuch der Seiten von <link rel=dns-prefetch href=//www.mysql.com /> <a href="https://www.mysql.com/"
    title="MySQL" 
     target="_blank" rel="nofollow noopener noreferrer" >
  MySQL&nbsp;<svg xmlns="http://www.w3.org/2000/svg" class="icon" aria-hidden="true" focusable="false" viewBox="0 -128 512 640">
    <path d="M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z"/>
  </svg></a>, <link rel=dns-prefetch href=//www.lighttpd.net /> <a href="http://www.lighttpd.net/"
    title="Lighttpd" 
     target="_blank" rel="nofollow noopener noreferrer" >
  Lighttpd&nbsp;<svg xmlns="http://www.w3.org/2000/svg" class="icon" aria-hidden="true" focusable="false" viewBox="0 -128 512 640">
    <path d="M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z"/>
  </svg></a> und <link rel=dns-prefetch href=//php.net /> <a href="http://php.net/"
    title="PHP" 
     target="_blank" rel="nofollow noopener noreferrer" >
  PHP&nbsp;<svg xmlns="http://www.w3.org/2000/svg" class="icon" aria-hidden="true" focusable="false" viewBox="0 -128 512 640">
    <path d="M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z"/>
  </svg></a>.</p>
<p>Ein Wort der Warnung noch für alle Besitzer eines DNS-320/DNS-320L/DNS-325/DNS-345: Dieses Tutorial schaltet den internen MySQL-Server aus, sodass dieser nicht mehr aktiv ist. Das kann und wird zu Problemen bei den Zusatz-Applikationen wie Gallery, Blog und co führen. Wenn diese Applikationen nicht genutzt werden, kann das Tutorial gefahrlos verwendet werden.</p>
<p>Los gehts mit dem <a href="/4523/hdd-installation-des-fun_plug-auf-nas-geraeten/"
    title="Einrichten von FFP 0.7" 
   >
  Einrichten von FFP 0.7</a>, dem <a href="/4554/uwsiteloader-tool-zum-download-der-sites-definitionen-fuer-pakete-des-fun_plug-0-7/"
    title="einbinden meines Repository &ldquo;Uli&rdquo;" 
   >
  einbinden meines Repository &ldquo;Uli&rdquo;</a> und anschließend der Installation von meinen Paketen:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">slacker -UaA uli:<span class="o">{</span>libtool,php,mysql,lighttpd,curl,libxml2,libmcrypt,libpng,libjpeg-turbo,sqlite<span class="o">}</span>
</span></span></code></pre></td></tr></table>
</div>
</div><p>Möglicherweise werden jetzt neue Dateien im Verzeichnis /ffp/start angelegt. Das muss nun erstmal ausgebügelt werden:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="o">[[</span> -f /ffp/start/kickangel.sh.new <span class="o">]]</span> <span class="o">&amp;&amp;</span> mv /ffp/start/kickangel.sh.new /ffp/start/kickangel.sh
</span></span><span class="line"><span class="cl"><span class="o">[[</span> -f /ffp/start/kickwebs.sh.new <span class="o">]]</span> <span class="o">&amp;&amp;</span> mv /ffp/start/kickwebs.sh.new /ffp/start/kickwebs.sh
</span></span><span class="line"><span class="cl"><span class="o">[[</span> -f /ffp/start/mysqld.sh.new <span class="o">]]</span> <span class="o">&amp;&amp;</span> mv /ffp/start/mysqld.sh.new /ffp/start/mysqld.sh
</span></span><span class="line"><span class="cl"><span class="o">[[</span> -f /ffp/start/lighttpd.sh.new <span class="o">]]</span> <span class="o">&amp;&amp;</span> mv /ffp/start/lighttpd.sh.new /ffp/start/lighttpd.sh
</span></span></code></pre></td></tr></table>
</div>
</div><p>Jetzt werden diese konfiguriert:
Los gehts mit lighttpd:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">cp /ffp/etc/examples/lighttpd/lighttpd.conf /ffp/etc
</span></span><span class="line"><span class="cl">rm /ffp/etc/examples/lighttpd.conf* /ffp/etc/examples/php.ini
</span></span></code></pre></td></tr></table>
</div>
</div><p>Weiter gehts mit MySQL. Zunächst wird die Konfiguration kopiert, dann die Datenbanken installiert und zu guter letzt die Installation abgesichert:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span><span class="lnt">5
</span><span class="lnt">6
</span><span class="lnt">7
</span><span class="lnt">8
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sh /ffp/start/mysqld.sh stop
</span></span><span class="line"><span class="cl">cp /ffp/etc/examples/mysql/my.cnf /ffp/etc/
</span></span><span class="line"><span class="cl">ln -snf /ffp/opt/srv /srv
</span></span><span class="line"><span class="cl">mkdir -p /srv/mysql/<span class="o">{</span>innodblogdir,binlog,log,tmp,datadir<span class="o">}</span>
</span></span><span class="line"><span class="cl">mkdir -p /srv/tmp
</span></span><span class="line"><span class="cl">/ffp/bin/mysql_install_db --basedir<span class="o">=</span>/ffp
</span></span><span class="line"><span class="cl">sh /ffp/start/mysqld.sh start
</span></span><span class="line"><span class="cl">/ffp/bin/mysql_secure_installation
</span></span></code></pre></td></tr></table>
</div>
</div><p>Das letzte Kommando wird folgendes ausgeben, ich habe meine Eingaben fett markiert. Das Passwort musst du dir merken!:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt"> 1
</span><span class="lnt"> 2
</span><span class="lnt"> 3
</span><span class="lnt"> 4
</span><span class="lnt"> 5
</span><span class="lnt"> 6
</span><span class="lnt"> 7
</span><span class="lnt"> 8
</span><span class="lnt"> 9
</span><span class="lnt">10
</span><span class="lnt">11
</span><span class="lnt">12
</span><span class="lnt">13
</span><span class="lnt">14
</span><span class="lnt">15
</span><span class="lnt">16
</span><span class="lnt">17
</span><span class="lnt">18
</span><span class="lnt">19
</span><span class="lnt">20
</span><span class="lnt">21
</span><span class="lnt">22
</span><span class="lnt">23
</span><span class="lnt">24
</span><span class="lnt">25
</span><span class="lnt">26
</span><span class="lnt">27
</span><span class="lnt">28
</span><span class="lnt">29
</span><span class="lnt">30
</span><span class="lnt">31
</span><span class="lnt">32
</span><span class="lnt">33
</span><span class="lnt">34
</span><span class="lnt">35
</span><span class="lnt">36
</span><span class="lnt">37
</span><span class="lnt">38
</span><span class="lnt">39
</span><span class="lnt">40
</span><span class="lnt">41
</span><span class="lnt">42
</span><span class="lnt">43
</span><span class="lnt">44
</span><span class="lnt">45
</span><span class="lnt">46
</span><span class="lnt">47
</span><span class="lnt">48
</span><span class="lnt">49
</span><span class="lnt">50
</span><span class="lnt">51
</span><span class="lnt">52
</span><span class="lnt">53
</span><span class="lnt">54
</span><span class="lnt">55
</span><span class="lnt">56
</span><span class="lnt">57
</span><span class="lnt">58
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-plaintext" data-lang="plaintext"><span class="line"><span class="cl"> NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
</span></span><span class="line"><span class="cl">SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">In order to log into MySQL to secure it, we&#39;ll need the current
</span></span><span class="line"><span class="cl">password for the root user. If you&#39;ve just installed MySQL, and
</span></span><span class="line"><span class="cl">you haven&#39;t set the root password yet, the password will be blank,
</span></span><span class="line"><span class="cl">so you should just press enter here.
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">Enter current password for root (enter for none):
</span></span><span class="line"><span class="cl">OK, successfully used password, moving on...
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">Setting the root password ensures that nobody can log into the MySQL
</span></span><span class="line"><span class="cl">root user without the proper authorisation.
</span></span><span class="line"><span class="cl">Set root password? [Y/n] **Y**
</span></span><span class="line"><span class="cl">New password: **MYVERYSECRETPASSWORD**
</span></span><span class="line"><span class="cl">Re-enter new password: **MYVERYSECRETPASSWORD**
</span></span><span class="line"><span class="cl">Password updated successfully!
</span></span><span class="line"><span class="cl">Reloading privilege tables..
</span></span><span class="line"><span class="cl">... Success!
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">By default, a MySQL installation has an anonymous user, allowing anyone
</span></span><span class="line"><span class="cl">to log into MySQL without having to have a user account created for
</span></span><span class="line"><span class="cl">them. This is intended only for testing, and to make the installation
</span></span><span class="line"><span class="cl">go a bit smoother. You should remove them before moving into a
</span></span><span class="line"><span class="cl">production environment.
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">Remove anonymous users? [Y/n] **Y**
</span></span><span class="line"><span class="cl">... Success!
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">Normally, root should only be allowed to connect from &#39;localhost&#39;. This
</span></span><span class="line"><span class="cl">ensures that someone cannot guess at the root password from the network.
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">Disallow root login remotely? [Y/n] **Y**
</span></span><span class="line"><span class="cl">... Success!
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">By default, MySQL comes with a database named &#39;test&#39; that anyone can
</span></span><span class="line"><span class="cl">access. This is also intended only for testing, and should be removed
</span></span><span class="line"><span class="cl">before moving into a production environment.
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">Remove test database and access to it? [Y/n] **Y**
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">- Dropping test database...
</span></span><span class="line"><span class="cl"> ... Success!
</span></span><span class="line"><span class="cl">- Removing privileges on test database...
</span></span><span class="line"><span class="cl"> ... Success!
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">Reloading the privilege tables will ensure that all changes made so far
</span></span><span class="line"><span class="cl">will take effect immediately.
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">Reload privilege tables now? [Y/n] **Y**
</span></span><span class="line"><span class="cl">... Success!
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">Cleaning up...
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">All done! If you&#39;ve completed all of the above steps, your MySQL
</span></span><span class="line"><span class="cl">installation should now be secure.
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">Thanks for using MySQL!
</span></span></code></pre></td></tr></table>
</div>
</div><p>Damit läuft nun MySQL einwandfrei und wir können den rest noch konfigurieren. Bitte merke dir das verwendete Passwort, du wirst es noch für weitere Tutorials brauchen.</p>
<p>Jetzt muss noch PHP konfiguriert werden:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">cp /ffp/etc/examples/php/php.ini /ffp/etc/
</span></span></code></pre></td></tr></table>
</div>
</div><p>Anschließend kann der Webserver gestartet werden.</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">mkdir -p /srv/www/<span class="o">{</span>pages,logs,tmp<span class="o">}</span>
</span></span><span class="line"><span class="cl">sh /ffp/start/kickangel.sh start <span class="o">&amp;&amp;</span> sh /ffp/start/kickwebs.sh start <span class="o">&amp;&amp;</span> sh /ffp/start/lighttpd.sh start
</span></span></code></pre></td></tr></table>
</div>
</div><p>Jetzt testen wir, ob es funktioniert:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">echo</span> <span class="s1">&#39;&#39;</span> &gt; /srv/www/pages/index.php
</span></span></code></pre></td></tr></table>
</div>
</div><p>Gehe nun auf die Adresse deines NAS (z.B. <link rel=dns-prefetch href=//nas /> <a href="http://nas/"
    title="http://nas/" 
     target="_blank" rel="nofollow noopener noreferrer" >
  http://nas/&nbsp;<svg xmlns="http://www.w3.org/2000/svg" class="icon" aria-hidden="true" focusable="false" viewBox="0 -128 512 640">
    <path d="M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z"/>
  </svg></a> oder die IP-Adresse, also z.b. <link rel=dns-prefetch href=//192.168.133.7 /> <a href="http://192.168.133.7/"
    title="http://192.168.133.7/" 
     target="_blank" rel="nofollow noopener noreferrer" >
  http://192.168.133.7/&nbsp;<svg xmlns="http://www.w3.org/2000/svg" class="icon" aria-hidden="true" focusable="false" viewBox="0 -128 512 640">
    <path d="M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z"/>
  </svg></a>). Dort sollte der Schriftzug &ldquo;PHP works!&rdquo; wie im Bild erscheinen.</p>
<p><img src="/upload/2012/11/4695-php.webp" alt="PHP works!" loading="lazy" title="PHP works!"></p>
<p>Wenn du das Administrationsinterface deines NAS suchst, ist das nun auf Port 81 erreichbar, also z.B. <link rel=dns-prefetch href=//nas:81 /> <a href="http://nas:81/"
    title="http://nas:81/" 
     target="_blank" rel="nofollow noopener noreferrer" >
  http://nas:81/&nbsp;<svg xmlns="http://www.w3.org/2000/svg" class="icon" aria-hidden="true" focusable="false" viewBox="0 -128 512 640">
    <path d="M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z"/>
  </svg></a> oder <link rel=dns-prefetch href=//192.168.133.7:81 /> <a href="http://192.168.133.7:81/"
    title="http://192.168.133.7:81/" 
     target="_blank" rel="nofollow noopener noreferrer" >
  http://192.168.133.7:81/&nbsp;<svg xmlns="http://www.w3.org/2000/svg" class="icon" aria-hidden="true" focusable="false" viewBox="0 -128 512 640">
    <path d="M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z"/>
  </svg></a>.</p>
<p>Wenn das nun alles läuft, können die Dienste nun permanent aktiviert werden:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">chmod a+x /ffp/start/<span class="o">{</span>kickangel,kickwebs,lighttpd,mysqld<span class="o">}</span>.sh
</span></span><span class="line"><span class="cl">chmod a+x /ffp/start/kickwebs.sh
</span></span><span class="line"><span class="cl">chmod a+x /ffp/start/lighttpd.sh
</span></span><span class="line"><span class="cl">chmod a+x /ffp/start/mysqld.sh
</span></span></code></pre></td></tr></table>
</div>
</div>]]></content:encoded>
    </item>
    <item>
      <title>PHP Fatal error:  [Zend Optimizer] Zend Debugger must be loaded after Zend Optimizer in Unknown on line 0</title>
      
      
      <link>https://wolf-u.li/php-fatal-error-zend-optimizer-zend-debugger-must-be-loaded-after-zend-optimizer-in-unknown-on-line-0/</link>
      <pubDate>Thu, 05 Jun 2008 13:12:44 +0500</pubDate>
      <guid>https://wolf-u.li/php-fatal-error-zend-optimizer-zend-debugger-must-be-loaded-after-zend-optimizer-in-unknown-on-line-0/</guid>
      <description>&lt;p&gt;Heute habe ich mal das &amp;ldquo;&lt;link rel=dns-prefetch href=//www.zend.com /&gt; &lt;a href=&#34;http://www.zend.com/de/products/studio/&#34;
    title=&#34;Zend Studio for Eclipse&#34; 
     target=&#34;_blank&#34; rel=&#34;nofollow noopener noreferrer&#34; &gt;
  Zend Studio for Eclipse&amp;nbsp;&lt;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; class=&#34;icon&#34; aria-hidden=&#34;true&#34; focusable=&#34;false&#34; viewBox=&#34;0 -128 512 640&#34;&gt;
    &lt;path d=&#34;M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z&#34;/&gt;
  &lt;/svg&gt;&lt;/a&gt;&amp;rdquo; getestet. Da ich meinen bestehenden lokalen Webserver gerne für die Tests nutzen wollte, musste ich dort den &lt;link rel=dns-prefetch href=//www.zend.com /&gt; &lt;a href=&#34;http://www.zend.com/de/products/studio/downloads&#34;
    title=&#34;Zend Debugger&#34; 
     target=&#34;_blank&#34; rel=&#34;nofollow noopener noreferrer&#34; &gt;
  Zend Debugger&amp;nbsp;&lt;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; class=&#34;icon&#34; aria-hidden=&#34;true&#34; focusable=&#34;false&#34; viewBox=&#34;0 -128 512 640&#34;&gt;
    &lt;path d=&#34;M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z&#34;/&gt;
  &lt;/svg&gt;&lt;/a&gt; aktivieren. Nach der Installation wie vorgeschrieben (Auswahl der richtigen Dll passend zur PHP-Version usw) meldete sich der Webserver bei mir mit folgendem Fehler:&lt;/p&gt;</description>
      
         <content:encoded><![CDATA[<p>Heute habe ich mal das &ldquo;<link rel=dns-prefetch href=//www.zend.com /> <a href="http://www.zend.com/de/products/studio/"
    title="Zend Studio for Eclipse" 
     target="_blank" rel="nofollow noopener noreferrer" >
  Zend Studio for Eclipse&nbsp;<svg xmlns="http://www.w3.org/2000/svg" class="icon" aria-hidden="true" focusable="false" viewBox="0 -128 512 640">
    <path d="M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z"/>
  </svg></a>&rdquo; getestet. Da ich meinen bestehenden lokalen Webserver gerne für die Tests nutzen wollte, musste ich dort den <link rel=dns-prefetch href=//www.zend.com /> <a href="http://www.zend.com/de/products/studio/downloads"
    title="Zend Debugger" 
     target="_blank" rel="nofollow noopener noreferrer" >
  Zend Debugger&nbsp;<svg xmlns="http://www.w3.org/2000/svg" class="icon" aria-hidden="true" focusable="false" viewBox="0 -128 512 640">
    <path d="M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z"/>
  </svg></a> aktivieren. Nach der Installation wie vorgeschrieben (Auswahl der richtigen Dll passend zur PHP-Version usw) meldete sich der Webserver bei mir mit folgendem Fehler:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-plaintext" data-lang="plaintext"><span class="line"><span class="cl">PHP Fatal error: [Zend Optimizer] Zend Debugger must be loaded after Zend Optimizer in Unknown on line 0
</span></span></code></pre></td></tr></table>
</div>
</div><p>Seltsamerweise sah aber meine php.ini korrekt aus:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span><span class="lnt">5
</span><span class="lnt">6
</span><span class="lnt">7
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-ini" data-lang="ini"><span class="line"><span class="cl"><span class="na">zend_extension_ts</span> <span class="o">=</span> <span class="s">&#34;C:\Programme\xampp\php\zendOptimizer\lib\ZendExtensionManager.dll&#34;</span>
</span></span><span class="line"><span class="cl"><span class="na">zend_extension_manager.optimizer_ts</span> <span class="o">=</span> <span class="s">&#34;C:\Programme\xampp\php\zendOptimizer\lib\Optimizer&#34;</span>
</span></span><span class="line"><span class="cl"><span class="na">zend_optimizer.enable_loader</span> <span class="o">=</span> <span class="s">0</span>
</span></span><span class="line"><span class="cl"><span class="na">zend_optimizer.optimization_level</span><span class="o">=</span><span class="s">15</span>
</span></span><span class="line"><span class="cl"><span class="na">zend_extension_ts</span><span class="o">=</span><span class="s">&#34;C:\Programme\xampp\php\zendDebugger\ZendDebugger.dll&#34;</span>
</span></span><span class="line"><span class="cl"><span class="na">zend_debugger.expose_remotely</span><span class="o">=</span><span class="s">allowed_hosts</span>
</span></span><span class="line"><span class="cl"><span class="na">zend_debugger.allow_hosts</span><span class="o">=</span><span class="s">127.0.0.1/32,192.168.0.0/255</span>
</span></span></code></pre></td></tr></table>
</div>
</div><p>Ich las also in wenig in verschiedensten Foren und kam dann auf die Lösung. Den Debugger sollte man als &ldquo;debug server&rdquo; nur mit dem Pfad, nicht der Dll in der php.ini einbinden:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-ini" data-lang="ini"><span class="line"><span class="cl"><span class="na">zend_extension_manager.debug_server_ts</span><span class="o">=</span><span class="s">C:\Programme\xampp\php\zendDebugger</span>
</span></span></code></pre></td></tr></table>
</div>
</div><p>Wenn man das so eingetragen hat, muss die ZendDebugger.dll in ein passendes Unterverzeichnis &ldquo;unter&rdquo; <em>zendDebugger</em> je nach PHP-version geschoben werden. Ich fahre beispielsweise <em>php-5.2.6</em>, also heisst mein Verzeichnis <em>php-5.2.x</em>. Welches nun das passende ist, lässt sich sehr schnell herausfinden. Einfach die obenstehende Zeile in die php.ini eintragen. Jetzt wird ein Fehler im Apache-Log geworfen:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-plaintext" data-lang="plaintext"><span class="line"><span class="cl">PHP Warning: Zend Debug Server for PHP 5.2.x cannot be found (expected at &#39;C:\\Programme\\xampp\\php\\zendDebugger\\php-5.2.x\\ZendDebugger.dll&#39;) - try reinstalling the Zend Debug Server in Unknown on line 0
</span></span></code></pre></td></tr></table>
</div>
</div><p>Wie man sieht, wurde auch ausgegeben, wo der Webserver bzw. dessen PHP den ZendDebugger erwartet hätte. In diesen Fall in <em>C:\Programme\xampp\php\zendDebugger\php-5.2.x\ZendDebugger.dll</em>. Einfach dort die passende Dll ablegen und gut is ;)</p>
]]></content:encoded>
    </item>
    <item>
      <title>mod_security auf Debian Sarge und Apache 2 installieren</title>
      
      
      <link>https://wolf-u.li/mod_security-auf-debian-sarge-und-apache-2-installieren/</link>
      <pubDate>Thu, 28 Dec 2006 11:38:33 +2800</pubDate>
      <guid>https://wolf-u.li/mod_security-auf-debian-sarge-und-apache-2-installieren/</guid>
      <description>&lt;p&gt;Heute &amp;ldquo;durfte&amp;rdquo; dieser Webserver eine Spam-Attacke ungeheuren Ausmaßes aushalten (drum auch der kurze Ausfall heute Mittag(was zu viel ist, ist zu viel&amp;hellip;), weshalb ich nun endlich &lt;link rel=dns-prefetch href=//www.modsecurity.org /&gt; &lt;a href=&#34;http://www.modsecurity.org&#34;
    title=&#34;mod_security&#34; 
     target=&#34;_blank&#34; rel=&#34;nofollow noopener noreferrer&#34; &gt;
  mod_security&amp;nbsp;&lt;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; class=&#34;icon&#34; aria-hidden=&#34;true&#34; focusable=&#34;false&#34; viewBox=&#34;0 -128 512 640&#34;&gt;
    &lt;path d=&#34;M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z&#34;/&gt;
  &lt;/svg&gt;&lt;/a&gt; auf dem Server eingerichtet habe. Wie das geht, zeige ich nun im folgenden.&lt;/p&gt;</description>
      
         <content:encoded><![CDATA[<p>Heute &ldquo;durfte&rdquo; dieser Webserver eine Spam-Attacke ungeheuren Ausmaßes aushalten (drum auch der kurze Ausfall heute Mittag(was zu viel ist, ist zu viel&hellip;), weshalb ich nun endlich <link rel=dns-prefetch href=//www.modsecurity.org /> <a href="http://www.modsecurity.org"
    title="mod_security" 
     target="_blank" rel="nofollow noopener noreferrer" >
  mod_security&nbsp;<svg xmlns="http://www.w3.org/2000/svg" class="icon" aria-hidden="true" focusable="false" viewBox="0 -128 512 640">
    <path d="M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z"/>
  </svg></a> auf dem Server eingerichtet habe. Wie das geht, zeige ich nun im folgenden.</p>
<p>Was ist überhaupt mod_security?</p>
<blockquote>
<p>ModSecurity is an embeddable web application firewall. It provides protection from a range of attacks against web applications and allows for HTTP traffic monitoring and real-time analysis with no changes to existing infrastructure.</p>
</blockquote>
<p>Ganz einfach eine z.B. in einen Webserver integrierte Firewall, welche keine Packete analysiert, sondern direkt die Befehle fürs HTTP-Protokoll. So erkennt diese z.b. SQL-Injections, phpBB-Exploit-Attacken und vieles mehr.</p>
<p>Wie man über ein schnelles <code>apt-cache search libapache2-mod-security</code> herausfinden kann, gibt es bereits ein packet für apache2 und mod-security auf Debian. Leider ist dieses älter als 1.9 (momentan ist es um genau zu sein 1.8.7-1), weshalb man den &ldquo;exclude&rdquo;-Befehl, mit welchem man bestimmte Seitenaufrufe (welche irrtümlich von mod_security als Angriff eingeschätzt werden) wieder ausschließen kann, leider nicht verwenden kann.</p>
<p>&ldquo;Geht gar nicht&rdquo; dachte ich mir und wollte schon fast selbst kompilieren (wäre auch ok gewesen, immerhin gibts ja schon mod_security2.0.4&hellip;.), da stolperte ich auf der Hersteller-Seite auf der Downloadseite über einen Link zu <del>debian-unofficial.org</del> (Link nicht mehr verfügbar), welche das Packet in einer Version &gt; 1.9 dort anbieten.</p>
<p>Ein kurzes einfügen in die <code>/etc/apt/sources.list</code> von:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">deb http://ftp.debian-unofficial.org/debian sarge main contrib non-free restricted
</span></span></code></pre></td></tr></table>
</div>
</div><p>und anschließendes:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">apt-get update
</span></span><span class="line"><span class="cl">apt-get install libapache2-mod-security
</span></span></code></pre></td></tr></table>
</div>
</div><p>brachte mir die Software auf den Server. Doch aktivieren musste man sie auch noch:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">a2enmod mod-security
</span></span></code></pre></td></tr></table>
</div>
</div><p>Damit war&rsquo;s im Apachen aktiviert, doch noch nix konfiguriert.
<strong>BITTE DEN APACHE2 NOCH NICHT NEUSTARTEN!</strong>
Folgender Inhalt muss in eine Datei (Name beliebig) in <code>/etc/apache2/conf.d/</code>:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt"> 1
</span><span class="lnt"> 2
</span><span class="lnt"> 3
</span><span class="lnt"> 4
</span><span class="lnt"> 5
</span><span class="lnt"> 6
</span><span class="lnt"> 7
</span><span class="lnt"> 8
</span><span class="lnt"> 9
</span><span class="lnt">10
</span><span class="lnt">11
</span><span class="lnt">12
</span><span class="lnt">13
</span><span class="lnt">14
</span><span class="lnt">15
</span><span class="lnt">16
</span><span class="lnt">17
</span><span class="lnt">18
</span><span class="lnt">19
</span><span class="lnt">20
</span><span class="lnt">21
</span><span class="lnt">22
</span><span class="lnt">23
</span><span class="lnt">24
</span><span class="lnt">25
</span><span class="lnt">26
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">SecFilterEngine On
</span></span><span class="line"><span class="cl">SecAuditLog /var/log/apache2/audit.log
</span></span><span class="line"><span class="cl">SecFilterDefaultAction deny,log,status:500.
</span></span><span class="line"><span class="cl">SecFilterScanPOST On
</span></span><span class="line"><span class="cl">SecFilterCheckURLEncoding On
</span></span><span class="line"><span class="cl">SecFilterCheckCookieFormat On
</span></span><span class="line"><span class="cl">SecFilterCheckUnicodeEncoding Off
</span></span><span class="line"><span class="cl">SecFilterNormalizeCookies On
</span></span><span class="line"><span class="cl">SecFilterCookieFormat <span class="m">1</span>
</span></span><span class="line"><span class="cl">SecServerResponseToken Off
</span></span><span class="line"><span class="cl">SecFilterForceByteRange <span class="m">1</span> <span class="m">255</span>
</span></span><span class="line"><span class="cl">SecServerSignature <span class="s2">&#34;Server secured with the Help of Uli&#39;s Blog - https://wolf-u.li&#34;</span>
</span></span><span class="line"><span class="cl">SecUploadDir /tmp
</span></span><span class="line"><span class="cl">SecUploadKeepFiles Off
</span></span><span class="line"><span class="cl">SecAuditEngine RelevantOnly
</span></span><span class="line"><span class="cl">SecFilterDebugLevel <span class="m">0</span>
</span></span><span class="line"><span class="cl">Include /etc/apache2/mod-security/exclude.conf
</span></span><span class="line"><span class="cl">Include /etc/apache2/mod-security/rules.conf
</span></span><span class="line"><span class="cl">Include /etc/apache2/mod-security/rootkits.conf
</span></span><span class="line"><span class="cl">Include /etc/apache2/mod-security/apache2-rules.conf
</span></span><span class="line"><span class="cl">Include /etc/apache2/mod-security/useragents.conf
</span></span><span class="line"><span class="cl">Include /etc/apache2/mod-security/proxy.conf
</span></span><span class="line"><span class="cl">Include /etc/apache2/mod-security/blacklist.conf
</span></span><span class="line"><span class="cl">Include /etc/apache2/mod-security/blacklist2.conf
</span></span><span class="line"><span class="cl">Include /etc/apache2/mod-security/recons.conf
</span></span><span class="line"><span class="cl">Include /etc/apache2/mod-security/badips.conf
</span></span></code></pre></td></tr></table>
</div>
</div><p>Damit obige Config funktioniert muss noch etwas heruntergeladen werden. Nämlich die Rules, welche festlegen, was geblockt werden soll. Entweder man verwendet hier ganz einfache Rules oder professionelle(zweiteres beschreibe ich im folgenden):</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">cd</span> /etc/apache2/
</span></span><span class="line"><span class="cl">wget http://www.gotroot.com/downloads/ftp/mod_security/apache2/apache2-gotrootrules-latest.tar.gz
</span></span><span class="line"><span class="cl">tar xfvz apache2-gotrootrules-latest.tar.gz
</span></span><span class="line"><span class="cl">mv apache2 mod-security
</span></span></code></pre></td></tr></table>
</div>
</div><p>Nun muss der Apache2 noch neu gestartet werden:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">/etc/init.d/apache2 restart
</span></span></code></pre></td></tr></table>
</div>
</div><p>Damit ist der WebServer mit mod_security ausgestattet. Aber man sollte auf jeden Fall die logs monitoren, ob nicht vielleicht Seiten geblockt werden, die eigentlich ok sind. Die kann man über das Logfile <code>/var/log/apache2/audit.log</code> anschauen ;)</p>
<p>Übrigens kann man die Regeln (welche immer mal wieder aktualisiert werden) auch automatisch herunterladen lassen, wozu es <link rel=dns-prefetch href=//www.gotroot.com /> <a href="http://www.gotroot.com/downloads/ftp/mod_security/downloaders/modsec.sh"
    title="hier" 
     target="_blank" rel="nofollow noopener noreferrer" >
  hier&nbsp;<svg xmlns="http://www.w3.org/2000/svg" class="icon" aria-hidden="true" focusable="false" viewBox="0 -128 512 640">
    <path d="M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z"/>
  </svg></a> ein Script gibt.</p>
<p>Bei Fehlern,Fragen, Anmerkungen oder Anregungen einfach einen Kommentar hinterlassen ;)
Greetz</p>
<p>PS: Übrigens sehr interessant ist das Handbuch zur Software!</p>
]]></content:encoded>
    </item>
    <item>
      <title>Installation von nginx mit PHP auf Gentoo</title>
      
      
      <link>https://wolf-u.li/installation-von-nginx-mit-php-auf-gentoo/</link>
      <pubDate>Sat, 15 Aug 2009 16:01:34 +1500</pubDate>
      <guid>https://wolf-u.li/installation-von-nginx-mit-php-auf-gentoo/</guid>
      <description>&lt;p&gt;Seit einigen Tagen habe ich einen neuen Root-Server, der meine Webseite ausliefern soll. Da ich ein bisschen experimentierfreudig bin, habe ich mich zur Installation des Webservers &lt;link rel=dns-prefetch href=//nginx.net /&gt; &lt;a href=&#34;http://nginx.net/&#34;
    title=&#34;nginx&#34; 
     target=&#34;_blank&#34; rel=&#34;nofollow noopener noreferrer&#34; &gt;
  nginx&amp;nbsp;&lt;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; class=&#34;icon&#34; aria-hidden=&#34;true&#34; focusable=&#34;false&#34; viewBox=&#34;0 -128 512 640&#34;&gt;
    &lt;path d=&#34;M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z&#34;/&gt;
  &lt;/svg&gt;&lt;/a&gt; (sprich engine-x) entschlossen, da dieser in vielen Benchmarks noch schneller als lighttpd ist und gleichzeitig weniger RAM verbraucht.&lt;/p&gt;</description>
      
         <content:encoded><![CDATA[<p>Seit einigen Tagen habe ich einen neuen Root-Server, der meine Webseite ausliefern soll. Da ich ein bisschen experimentierfreudig bin, habe ich mich zur Installation des Webservers <link rel=dns-prefetch href=//nginx.net /> <a href="http://nginx.net/"
    title="nginx" 
     target="_blank" rel="nofollow noopener noreferrer" >
  nginx&nbsp;<svg xmlns="http://www.w3.org/2000/svg" class="icon" aria-hidden="true" focusable="false" viewBox="0 -128 512 640">
    <path d="M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z"/>
  </svg></a> (sprich engine-x) entschlossen, da dieser in vielen Benchmarks noch schneller als lighttpd ist und gleichzeitig weniger RAM verbraucht.</p>
<p>Gleichzeitig sind aber die Rewrite-rules einfacher als beim <link rel=dns-prefetch href=//www.lighttpd.net /> <a href="http://www.lighttpd.net/"
    title="lighttpd" 
     target="_blank" rel="nofollow noopener noreferrer" >
  lighttpd&nbsp;<svg xmlns="http://www.w3.org/2000/svg" class="icon" aria-hidden="true" focusable="false" viewBox="0 -128 512 640">
    <path d="M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z"/>
  </svg></a>, da diese fast 1:1 vom Apache zu übernehmen sind (was den Umzug der Seiten deutlich einfacher gestaltet). Ich möchte direkt nativ alles über nginx und dessen FastCGI-Backend ausliefern, weshalb ein paar zusätzliche Artikel zu deren Rewrite-Rules oder Stolperfallen bei der Einrichtung kommen werden.</p>
<p>Dieser Artikel ist Teil einer Reihe zum Webserver nginx.
Schau dir auch die anderen Artikel an: <a href="/3137/leitartikel-zur-konfiguration-und-installation-des-webservers-nginx/"
    title="Zum Leitartikel" 
   >
  Zum Leitartikel</a></p>
<p>Los geht&rsquo;s mit der Installation von Gentoo, welche ich nach <link rel=dns-prefetch href=//www.gentoo.org /> <a href="http://www.gentoo.org/doc/de/handbook/"
    title="Handbuch" 
     target="_blank" rel="nofollow noopener noreferrer" >
  Handbuch&nbsp;<svg xmlns="http://www.w3.org/2000/svg" class="icon" aria-hidden="true" focusable="false" viewBox="0 -128 512 640">
    <path d="M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z"/>
  </svg></a> durchführe. Hierzu verliere ich keine weiteren Worte, da das Handbuch wirklich umfangreich und ausreichend ist. Wichtig ist, dass Portage auf dem aktuellen Stand ist, das sollte aber nach der Installation der Fall sein.</p>
<p>Ich wollte den nginx mit den zusätzlichen Modulen <link rel=dns-prefetch href=//wiki.nginx.org /> <a href="http://wiki.nginx.org/NginxHttpFcgiModule"
    title="FastCGI" 
     target="_blank" rel="nofollow noopener noreferrer" >
  FastCGI&nbsp;<svg xmlns="http://www.w3.org/2000/svg" class="icon" aria-hidden="true" focusable="false" viewBox="0 -128 512 640">
    <path d="M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z"/>
  </svg></a>, PCRE, <link rel=dns-prefetch href=//wiki.nginx.org /> <a href="http://wiki.nginx.org/NginxHttpSslModule"
    title="SSL" 
     target="_blank" rel="nofollow noopener noreferrer" >
  SSL&nbsp;<svg xmlns="http://www.w3.org/2000/svg" class="icon" aria-hidden="true" focusable="false" viewBox="0 -128 512 640">
    <path d="M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z"/>
  </svg></a>, <link rel=dns-prefetch href=//wiki.nginx.org /> <a href="http://wiki.nginx.org/NginxHttpStubStatusModule"
    title="Stub_Status" 
     target="_blank" rel="nofollow noopener noreferrer" >
  Stub_Status&nbsp;<svg xmlns="http://www.w3.org/2000/svg" class="icon" aria-hidden="true" focusable="false" viewBox="0 -128 512 640">
    <path d="M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z"/>
  </svg></a>, <link rel=dns-prefetch href=//wiki.nginx.org /> <a href="http://wiki.nginx.org/NginxHttpDavModule"
    title="WebDAV" 
     target="_blank" rel="nofollow noopener noreferrer" >
  WebDAV&nbsp;<svg xmlns="http://www.w3.org/2000/svg" class="icon" aria-hidden="true" focusable="false" viewBox="0 -128 512 640">
    <path d="M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z"/>
  </svg></a> und <link rel=dns-prefetch href=//wiki.nginx.org /> <a href="http://wiki.nginx.org/NginxHttpGzipStaticModule"
    title="zlib" 
     target="_blank" rel="nofollow noopener noreferrer" >
  zlib&nbsp;<svg xmlns="http://www.w3.org/2000/svg" class="icon" aria-hidden="true" focusable="false" viewBox="0 -128 512 640">
    <path d="M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z"/>
  </svg></a>, weshalb ich die folgenden USE-Flags hinzugefügt und anschließend den nginx installiert habe:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">echo</span> <span class="s2">&#34;www-servers/nginx fastcgi pcre ssl status webdav zlib&#34;</span> &gt;&gt; /etc/portage/package.use
</span></span><span class="line"><span class="cl">emerge -av nginx
</span></span></code></pre></td></tr></table>
</div>
</div><p>Zum Zeitpunkt des Schreibens wird Version 0.7.61 installiert.</p>
<p>Nach dem emergen von Nginx kommt bei mir die Konfiguration von PHP. Ich fahre schon seit Ewigkeiten <em>mod_fcgid</em> unter Apache, welcher die Verwaltung (Starten/Stoppen/Steuerung) der PHP-Prozesse selbst übernimmt. Bei nginx wird das etwas anders angesteuert, da die PHP-Prozesse schon existieren müssen und nginx diese nicht selbst erstellt. Um dies zu vereinfachen, gibt es das Project <link rel=dns-prefetch href=//redmine.lighttpd.net /> <a href="http://redmine.lighttpd.net/projects/spawn-fcgi/wiki"
    title="spawn-fcgi" 
     target="_blank" rel="nofollow noopener noreferrer" >
  spawn-fcgi&nbsp;<svg xmlns="http://www.w3.org/2000/svg" class="icon" aria-hidden="true" focusable="false" viewBox="0 -128 512 640">
    <path d="M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z"/>
  </svg></a>, welches aus dem Webserverprojekt <link rel=dns-prefetch href=//www.lighttpd.net /> <a href="http://www.lighttpd.net/"
    title="lighttpd" 
     target="_blank" rel="nofollow noopener noreferrer" >
  lighttpd&nbsp;<svg xmlns="http://www.w3.org/2000/svg" class="icon" aria-hidden="true" focusable="false" viewBox="0 -128 512 640">
    <path d="M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z"/>
  </svg></a> ausgegliedert wurde.</p>
<p>Zum Zeitpunkt dieses Tutorials ist dieses Paket in Gentoo noch nicht als stable gekennzeichnet, weshalb man es vor der Installation möglicherweise erst freischalten muss:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">echo</span> <span class="s2">&#34;www-servers/spawn-fcgi&#34;</span> &gt;&gt; /etc/portage/package.keywords
</span></span><span class="line"><span class="cl">emerge -av spawn-fcgi
</span></span></code></pre></td></tr></table>
</div>
</div><p>Jetzt sollte man sich ein paar Gedanken zur Aufteilung der Webserverhosts über die PHP-Prozesse machen. Dazu muss man ein wenig Hintergrund zur <link rel=dns-prefetch href=//de.wikipedia.org /> <a href="http://de.wikipedia.org/wiki/FastCGI"
    title="FastCGI" 
     target="_blank" rel="nofollow noopener noreferrer" >
  FastCGI&nbsp;<svg xmlns="http://www.w3.org/2000/svg" class="icon" aria-hidden="true" focusable="false" viewBox="0 -128 512 640">
    <path d="M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z"/>
  </svg></a>-Technologie kennen. Zur Verarbeitung der PHP-Seiten wird ein PHP-Interpreter gestartet mit dem der Webserver über einen Unix-Socket oder einen TCP-Port kommuniziert. Diese Interpreter kann man unter einem anderen Nutzer (als root) starten, wodurch ein wenig zusätzliche Sicherheit geschafft wird, wenn dieser Nutzer weniger Rechte hat. Im Idealfall sollte man also für jeden Vhost einen eigenen PHP-Interpreter und Nutzer haben, um die höchste Sicherheit zu erhalten. Leider benötigt jeder Interpreter ein wenig RAM, sodass man sich überlegen sollte, wieviele man davon gleichzeitig im RAM halten möchte. Ich habe für mich einen Mix aus Performance und Sicherheit gewählt. Ich zeige mal an einem Vhost, wie man diese PHP-Interpreter startet.</p>
<p>Startet man nun <code>/etc/init.d/spawn-fcgi</code>, so wird man ermahnt, dass das so nicht funktioniert:</p>
<blockquote>
<ul>
<li>You are not supposed to run this script directly. Create a symlink</li>
<li>for the FastCGI application you want to run as well as a copy</li>
<li>of the configuration file and modify it appropriately like so&hellip;</li>
<li></li>
<li>ln -s spawn-fcgi /etc/init.d/spawn-fcgi.trac</li>
<li>cp /etc/conf.d/spawn-fcgi /etc/conf.d/spawn-fcgi.trac</li>
<li>nano /etc/conf.d/spawn-fcgi.trac</li>
</ul>
</blockquote>
<p>Folglich führe ich diese Schritte für meinen ersten FastCGI-Server durch:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">ln -s spawn-fcgi /etc/init.d/spawn-fcgi.wolfuli
</span></span><span class="line"><span class="cl">cp /etc/conf.d/spawn-fcgi /etc/conf.d/spawn-fcgi.wolfuli
</span></span></code></pre></td></tr></table>
</div>
</div><p>Jetzt muss man die Konfigurationsdatei <code>/etc/conf.d/spawn-fcgi.wolfuli</code> editieren:</p>
<blockquote>
<p><code>FCGI_SOCKET= FCGI_ADDRESS=127.0.0.1 FCGI_PORT=1234 FCGI_PROGRAM=/usr/bin/php-cgi FCGI_CHILDREN=1 FCGI_CHROOT= FCGI_CHDIR= FCGI_USER=wolfuli FCGI_GROUP=wolfuli PHPRC=&quot;/var/www/php-ini/wolfuli/&quot; PHP_FCGI_CHILDREN=10 PHP_FCGI_MAX_REQUESTS=1000 ALLOWED_ENV=&quot;PATH PHP_FCGI_CHILDREN PHP_FCGI_MAX_REQUESTS PHPRC&quot;</code></p>
</blockquote>
<p>Über die Variable <em>PHPRC</em> wurde ein Verzeichnis festgelegt, in dem man man eine, für den Vhost angepasste, <em>php.ini</em> hinterlegen kann.</p>
<p>Jetzt muss man noch den Nutzer <em>wolfuli</em> samt der gleichen Nutzergruppe anlegen:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">useradd -s /bin/false -U wolfuli
</span></span></code></pre></td></tr></table>
</div>
</div><p>Jetzt richten wir mal unsere Vhosts ein. Aus praktischen Gründen habe ich mich entschlossen ein &ldquo;sites-available&rdquo; und ein &ldquo;sites-enabled&rdquo;-Verzeichnis anzulegen.</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">mkdir /etc/nginx/sites-available
</span></span><span class="line"><span class="cl">mkdir /etc/nginx/sites-enabled
</span></span></code></pre></td></tr></table>
</div>
</div><p>So kann ich Vhosts im ordner <em>sites-available</em> konfigurieren und dann diese dann in <em>sites-enabled</em> softlinken, wenn sie aktiv sein sollen. So kann ich mal vhosts abschalten ohne diese gleich löschen zu müssen.</p>
<p>Die <code>/etc/nginx/nginx.conf</code> habe ich ebenfalls ein wenig abgeändert, sodass diese wie folgt aussieht:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt"> 1
</span><span class="lnt"> 2
</span><span class="lnt"> 3
</span><span class="lnt"> 4
</span><span class="lnt"> 5
</span><span class="lnt"> 6
</span><span class="lnt"> 7
</span><span class="lnt"> 8
</span><span class="lnt"> 9
</span><span class="lnt">10
</span><span class="lnt">11
</span><span class="lnt">12
</span><span class="lnt">13
</span><span class="lnt">14
</span><span class="lnt">15
</span><span class="lnt">16
</span><span class="lnt">17
</span><span class="lnt">18
</span><span class="lnt">19
</span><span class="lnt">20
</span><span class="lnt">21
</span><span class="lnt">22
</span><span class="lnt">23
</span><span class="lnt">24
</span><span class="lnt">25
</span><span class="lnt">26
</span><span class="lnt">27
</span><span class="lnt">28
</span><span class="lnt">29
</span><span class="lnt">30
</span><span class="lnt">31
</span><span class="lnt">32
</span><span class="lnt">33
</span><span class="lnt">34
</span><span class="lnt">35
</span><span class="lnt">36
</span><span class="lnt">37
</span><span class="lnt">38
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">user nginx nginx<span class="p">;</span>
</span></span><span class="line"><span class="cl">worker_processes 2<span class="p">;</span>
</span></span><span class="line"><span class="cl">error_log /var/log/nginx/error_log info<span class="p">;</span>
</span></span><span class="line"><span class="cl">events <span class="o">{</span>
</span></span><span class="line"><span class="cl"> worker_connections 8192<span class="p">;</span>
</span></span><span class="line"><span class="cl"> use epoll<span class="p">;</span>
</span></span><span class="line"><span class="cl"><span class="o">}</span>
</span></span><span class="line"><span class="cl">http <span class="o">{</span>
</span></span><span class="line"><span class="cl"> include /etc/nginx/mime.types<span class="p">;</span>
</span></span><span class="line"><span class="cl"> default_type application/octet-stream<span class="p">;</span>
</span></span><span class="line"><span class="cl"> log_format main
</span></span><span class="line"><span class="cl"> <span class="s1">&#39;$remote_addr - $remote_user [$time_local] &#39;</span>
</span></span><span class="line"><span class="cl"> <span class="s1">&#39;&#34;$request&#34; $status $bytes_sent &#39;</span>
</span></span><span class="line"><span class="cl"> <span class="s1">&#39;&#34;$http_referer&#34; &#34;$http_user_agent&#34; &#39;</span>
</span></span><span class="line"><span class="cl"> <span class="s1">&#39;&#34;$gzip_ratio&#34;&#39;</span><span class="p">;</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"> client_header_timeout 10m<span class="p">;</span>
</span></span><span class="line"><span class="cl"> client_body_timeout 10m<span class="p">;</span>
</span></span><span class="line"><span class="cl"> send_timeout 10m<span class="p">;</span>
</span></span><span class="line"><span class="cl"> connection_pool_size 256<span class="p">;</span>
</span></span><span class="line"><span class="cl"> client_header_buffer_size 1k<span class="p">;</span>
</span></span><span class="line"><span class="cl"> large_client_header_buffers <span class="m">4</span> 2k<span class="p">;</span>
</span></span><span class="line"><span class="cl"> request_pool_size 4k<span class="p">;</span>
</span></span><span class="line"><span class="cl"> gzip on<span class="p">;</span>
</span></span><span class="line"><span class="cl"> gzip_min_length 1100<span class="p">;</span>
</span></span><span class="line"><span class="cl"> gzip_buffers <span class="m">4</span> 8k<span class="p">;</span>
</span></span><span class="line"><span class="cl"> gzip_types text/plain<span class="p">;</span>
</span></span><span class="line"><span class="cl"> output_buffers <span class="m">1</span> 32k<span class="p">;</span>
</span></span><span class="line"><span class="cl"> postpone_output 1460<span class="p">;</span>
</span></span><span class="line"><span class="cl"> sendfile on<span class="p">;</span>
</span></span><span class="line"><span class="cl"> tcp_nopush on<span class="p">;</span>
</span></span><span class="line"><span class="cl"> tcp_nodelay on<span class="p">;</span>
</span></span><span class="line"><span class="cl"> keepalive_timeout <span class="m">75</span> 20<span class="p">;</span>
</span></span><span class="line"><span class="cl"> ignore_invalid_headers on<span class="p">;</span>
</span></span><span class="line"><span class="cl"> index index.html<span class="p">;</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"> include /etc/nginx/sites-enabled/*<span class="p">;</span>
</span></span><span class="line"><span class="cl"><span class="o">}</span>
</span></span></code></pre></td></tr></table>
</div>
</div><p>Wie man sieht, ist nun in der letzten Zeile ein include aller Vhosts aus dem &ldquo;<code>sites-enabled</code>&quot;-Verzeichnis. Die Variable &ldquo;<code>worker_processes</code>&rdquo; sollte auf die Anzahl der CPU-Kerne gesetzt werden, was in meinem Falle zwei sind.</p>
<p>Damit ist die Installation abgeschlossen, jetzt kann man nun einen PHP-VHost anlegen. Dazu muss zunächst die Datei /etc/nginx/fastcgi_params angelegt bzw. modifiziert werden, sodass diese so aussieht:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt"> 1
</span><span class="lnt"> 2
</span><span class="lnt"> 3
</span><span class="lnt"> 4
</span><span class="lnt"> 5
</span><span class="lnt"> 6
</span><span class="lnt"> 7
</span><span class="lnt"> 8
</span><span class="lnt"> 9
</span><span class="lnt">10
</span><span class="lnt">11
</span><span class="lnt">12
</span><span class="lnt">13
</span><span class="lnt">14
</span><span class="lnt">15
</span><span class="lnt">16
</span><span class="lnt">17
</span><span class="lnt">18
</span><span class="lnt">19
</span><span class="lnt">20
</span><span class="lnt">21
</span><span class="lnt">22
</span><span class="lnt">23
</span><span class="lnt">24
</span><span class="lnt">25
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">fastcgi_param QUERY_STRING <span class="nv">$query_string</span><span class="p">;</span>
</span></span><span class="line"><span class="cl">fastcgi_param REQUEST_METHOD <span class="nv">$request_method</span><span class="p">;</span>
</span></span><span class="line"><span class="cl">fastcgi_param CONTENT_TYPE <span class="nv">$content_type</span><span class="p">;</span>
</span></span><span class="line"><span class="cl">fastcgi_param CONTENT_LENGTH <span class="nv">$content_length</span><span class="p">;</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">fastcgi_param SCRIPT_NAME <span class="nv">$fastcgi_script_name</span><span class="p">;</span>
</span></span><span class="line"><span class="cl">fastcgi_param SCRIPT_FILENAME <span class="nv">$document_root$fastcgi_script_name</span><span class="p">;</span>
</span></span><span class="line"><span class="cl">fastcgi_param REQUEST_URI <span class="nv">$request_uri</span><span class="p">;</span>
</span></span><span class="line"><span class="cl">fastcgi_param DOCUMENT_URI <span class="nv">$document_uri</span><span class="p">;</span>
</span></span><span class="line"><span class="cl">fastcgi_param DOCUMENT_ROOT <span class="nv">$document_root</span><span class="p">;</span>
</span></span><span class="line"><span class="cl">fastcgi_param SERVER_PROTOCOL <span class="nv">$server_protocol</span><span class="p">;</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">fastcgi_param GATEWAY_INTERFACE CGI/1.1<span class="p">;</span>
</span></span><span class="line"><span class="cl">fastcgi_param SERVER_SOFTWARE wolfuli/1337<span class="p">;</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">fastcgi_param REMOTE_ADDR <span class="nv">$remote_addr</span><span class="p">;</span>
</span></span><span class="line"><span class="cl">fastcgi_param REMOTE_PORT <span class="nv">$remote_port</span><span class="p">;</span>
</span></span><span class="line"><span class="cl">fastcgi_param SERVER_ADDR <span class="nv">$server_addr</span><span class="p">;</span>
</span></span><span class="line"><span class="cl">fastcgi_param SERVER_PORT <span class="nv">$server_port</span><span class="p">;</span>
</span></span><span class="line"><span class="cl">fastcgi_param SERVER_NAME <span class="nv">$server_name</span><span class="p">;</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">fastcgi_index index.php<span class="p">;</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># PHP only, required if PHP was built with --enable-force-cgi-redirect</span>
</span></span><span class="line"><span class="cl">fastcgi_param REDIRECT_STATUS 200<span class="p">;</span>
</span></span></code></pre></td></tr></table>
</div>
</div><p>Diese Datei legt einige Parameter im Zusammenspiel von PHP (FastCGI) und nginx fest.</p>
<p>Hier der Beispielvhost <em>example.com</em>, welcher unter <code>/etc/nginx/sites-available/example.com</code> angelegt wird:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt"> 1
</span><span class="lnt"> 2
</span><span class="lnt"> 3
</span><span class="lnt"> 4
</span><span class="lnt"> 5
</span><span class="lnt"> 6
</span><span class="lnt"> 7
</span><span class="lnt"> 8
</span><span class="lnt"> 9
</span><span class="lnt">10
</span><span class="lnt">11
</span><span class="lnt">12
</span><span class="lnt">13
</span><span class="lnt">14
</span><span class="lnt">15
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">server <span class="o">{</span>
</span></span><span class="line"><span class="cl"> listen 80<span class="p">;</span>
</span></span><span class="line"><span class="cl"> server_name example.com<span class="p">;</span>
</span></span><span class="line"><span class="cl"> error_log /var/log/nginx/example.com.log warn<span class="p">;</span>
</span></span><span class="line"><span class="cl"> root /var/www/example.com/<span class="p">;</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"> location / <span class="o">{</span>
</span></span><span class="line"><span class="cl"> index index.php<span class="p">;</span>
</span></span><span class="line"><span class="cl"> <span class="o">}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"> location ~ <span class="se">\.</span>php$ <span class="o">{</span>
</span></span><span class="line"><span class="cl"> fastcgi_pass 127.0.0.1:1234<span class="p">;</span>
</span></span><span class="line"><span class="cl"> include /etc/nginx/fastcgi_params<span class="p">;</span>
</span></span><span class="line"><span class="cl"> <span class="o">}</span>
</span></span><span class="line"><span class="cl"><span class="o">}</span>
</span></span></code></pre></td></tr></table>
</div>
</div><p>Jetzt muss man den fertigen Vhost nur noch softlinken:</p>
<blockquote>
<p><code>cd /etc/nginx/sites-enabled/ ln -s ../sites-available/example.com</code></p>
</blockquote>
<p>Und nginx die neuen Konfigurationsdateien lesen lassen:</p>
<blockquote>
<p><code>/etc/init.d/nginx reload</code></p>
</blockquote>
<p>Das wars. Lies auch die anderen Artikel zu diesem Thema in diesem <a href="/3137/leitartikel-zur-konfiguration-und-installation-des-webservers-nginx/"
    title="Leitartikel" 
   >
  Leitartikel</a>.</p>
]]></content:encoded>
    </item>
    <item>
      <title>Umleitung bei ausschließlicher Angabe der post_id in der URL auf den vollen Wordpress-Permalink mittels Nginx</title>
      
      
      <link>https://wolf-u.li/umleitung-bei-ausschliesslicher-angabe-der-post_id-in-der-url-auf-den-vollen-wordpress-permalink-mittels-nginx/</link>
      <pubDate>Sat, 27 Mar 2010 16:05:56 +2700</pubDate>
      <guid>https://wolf-u.li/umleitung-bei-ausschliesslicher-angabe-der-post_id-in-der-url-auf-den-vollen-wordpress-permalink-mittels-nginx/</guid>
      <description>&lt;p&gt;Ich poste mittels &lt;link rel=dns-prefetch href=//wordpress.org /&gt; &lt;a href=&#34;http://wordpress.org/extend/plugins/twitpress/&#34;
    title=&#34;Twitpress&#34; 
     target=&#34;_blank&#34; rel=&#34;nofollow noopener noreferrer&#34; &gt;
  Twitpress&amp;nbsp;&lt;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; class=&#34;icon&#34; aria-hidden=&#34;true&#34; focusable=&#34;false&#34; viewBox=&#34;0 -128 512 640&#34;&gt;
    &lt;path d=&#34;M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z&#34;/&gt;
  &lt;/svg&gt;&lt;/a&gt; meine Einträge auf &lt;link rel=dns-prefetch href=//twitter.com /&gt; &lt;a href=&#34;http://twitter.com/wolfuli&#34;
    title=&#34;Twitter&#34; 
     target=&#34;_blank&#34; rel=&#34;nofollow noopener noreferrer&#34; &gt;
  Twitter&amp;nbsp;&lt;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; class=&#34;icon&#34; aria-hidden=&#34;true&#34; focusable=&#34;false&#34; viewBox=&#34;0 -128 512 640&#34;&gt;
    &lt;path d=&#34;M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z&#34;/&gt;
  &lt;/svg&gt;&lt;/a&gt;, wobei ich die URL zum Eintrag mittels der ID des Posts, also im Fall dieses Posts 3385, angebe. Dies sieht dann so aus:&lt;/p&gt;</description>
      
         <content:encoded><![CDATA[<p>Ich poste mittels <link rel=dns-prefetch href=//wordpress.org /> <a href="http://wordpress.org/extend/plugins/twitpress/"
    title="Twitpress" 
     target="_blank" rel="nofollow noopener noreferrer" >
  Twitpress&nbsp;<svg xmlns="http://www.w3.org/2000/svg" class="icon" aria-hidden="true" focusable="false" viewBox="0 -128 512 640">
    <path d="M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z"/>
  </svg></a> meine Einträge auf <link rel=dns-prefetch href=//twitter.com /> <a href="http://twitter.com/wolfuli"
    title="Twitter" 
     target="_blank" rel="nofollow noopener noreferrer" >
  Twitter&nbsp;<svg xmlns="http://www.w3.org/2000/svg" class="icon" aria-hidden="true" focusable="false" viewBox="0 -128 512 640">
    <path d="M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z"/>
  </svg></a>, wobei ich die URL zum Eintrag mittels der ID des Posts, also im Fall dieses Posts 3385, angebe. Dies sieht dann so aus:</p>
<blockquote>
<p>Neuer Blog-Eintrag: Umleitung bei ausschließlicher Angabe der post_id in der URL auf den vollen Wordpress-Permalink mittels Nginx <link rel=dns-prefetch href=//wolf-u.li /> <a href="https://wolf-u.li/3385/"
    title="https://wolf-u.li/3385/" 
     target="_blank" rel="nofollow noopener noreferrer" >
  https://wolf-u.li/3385/&nbsp;<svg xmlns="http://www.w3.org/2000/svg" class="icon" aria-hidden="true" focusable="false" viewBox="0 -128 512 640">
    <path d="M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z"/>
  </svg></a></p>
</blockquote>
<ins class="adsbygoogle" style="display:block; text-align:center;" data-ad-layout="in-article" data-ad-format="fluid" data-ad-client="ca-pub-2322978122735420" data-ad-slot="3161252284"></ins>
<p>Früher wurde dann per Wordpress auf die volle URL umgeleitet, jedoch funktioniert dies in der Version 2.9.2, die ich momentan fahre, nicht mehr so. Das führte dazu, dass unter <link rel=dns-prefetch href=//wolf-u.li /> <a href="https://wolf-u.li/3385/"
    title="https://wolf-u.li/3385/" 
     target="_blank" rel="nofollow noopener noreferrer" >
  https://wolf-u.li/3385/&nbsp;<svg xmlns="http://www.w3.org/2000/svg" class="icon" aria-hidden="true" focusable="false" viewBox="0 -128 512 640">
    <path d="M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z"/>
  </svg></a> und der langen Url des Beitrags der gleiche Inhalt angezeigt wurde, was zu Problemen mit den Suchmaschinen führen kann. Da ich keinen Bock hatte, mich bei mir auf Fehlersuche zu begeben, habe ich kurz gegoogled und festgestellt, dass dies für Version 3.1 von Wordpress wieder<link rel=dns-prefetch href=//core.trac.wordpress.org /> <a href="http://core.trac.wordpress.org/ticket/12456"
    title="geplant" 
     target="_blank" rel="nofollow noopener noreferrer" >
  geplant&nbsp;<svg xmlns="http://www.w3.org/2000/svg" class="icon" aria-hidden="true" focusable="false" viewBox="0 -128 512 640">
    <path d="M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z"/>
  </svg></a> ist. Ein wenig <link rel=dns-prefetch href=//codex.wordpress.org /> <a href="http://codex.wordpress.org/Using_Permalinks#Long_Permalinks#Long_Permalinks"
    title="Recherche" 
     target="_blank" rel="nofollow noopener noreferrer" >
  Recherche&nbsp;<svg xmlns="http://www.w3.org/2000/svg" class="icon" aria-hidden="true" focusable="false" viewBox="0 -128 512 640">
    <path d="M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z"/>
  </svg></a> brachte an den Tag, dass man auch manuell per .htaccess (bei Nutzung von Apache) auf <em>index.php?p={POST_ID}</em> umleiten kann.</p>
<p>Dieser Artikel ist Teil einer Reihe zum Webserver nginx. Schau dir auch die anderen Artikel an: <a href="/3137/leitartikel-zur-konfiguration-und-installation-des-webservers-nginx/"
    title="Zum Leitartikel" 
   >
  Zum Leitartikel</a></p>
<p>Da ich den Webserver Nginx einsetze, habe ich also nun einfach eine Prüfung geschrieben, die nachsieht, ob nach wolf-u.li/ einfach nur eine Zahl folgt und in diesem Fall auf die index.php leitet, welche dann auf die korrekte lange URL leitet. Die komplette Location könnte also so aussehen:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span><span class="lnt">5
</span><span class="lnt">6
</span><span class="lnt">7
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">location / <span class="o">{</span>
</span></span><span class="line"><span class="cl"> <span class="k">if</span> <span class="o">(</span>-f <span class="nv">$request_filename</span><span class="o">)</span> <span class="o">{</span>
</span></span><span class="line"><span class="cl"> break<span class="p">;</span>
</span></span><span class="line"><span class="cl"> <span class="o">}</span>
</span></span><span class="line"><span class="cl"> rewrite ^/<span class="o">([</span>0-9<span class="o">]</span>+<span class="o">)</span>/$ /index.php?p<span class="o">=</span><span class="nv">$1</span> last<span class="p">;</span>
</span></span><span class="line"><span class="cl"> rewrite ^<span class="o">(</span>.+<span class="o">)</span>$ /index.php last<span class="p">;</span>
</span></span><span class="line"><span class="cl"><span class="o">}</span>
</span></span></code></pre></td></tr></table>
</div>
</div><p>Zuerst wird geprüft, ob der angeforderte Dateiname vorhanden ist. Wenn dem der Fall ist, werden keine weiteren Prüfungen durchgeführt und diese Datei zurückgegeben. Wenn nicht, wird zunächst die oben beschriebene Prüfung durchgeführt. Wurde kein Match ermittelt, so wird einfach nur auf index.php umgeleitet.</p>
<p>Das behob bei mir das Problem des doppelten Contents ;)</p>
]]></content:encoded>
    </item>
    <item>
      <title>nginx: [emerg] duplicate listen options for [::]:443</title>
      
      
      <link>https://wolf-u.li/nginx-emerg-duplicate-listen-options-for-443/</link>
      <pubDate>Fri, 17 Jan 2014 21:45:48 +1700</pubDate>
      <guid>https://wolf-u.li/nginx-emerg-duplicate-listen-options-for-443/</guid>
      <description>&lt;p&gt;Soeben habe ich auf einen zweiten Host SSL konfiguriert. Plattform ist ein nginx webserver gewesen, der mir beim Konfigurationstest folgenden Fehler ausspuckte:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-plaintext&#34; data-lang=&#34;plaintext&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;[....] Testing nginx configuration:Configuration test failed!
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;nginx: [emerg] duplicate listen options for [::]:443 in /etc/nginx/sites-enabled/wolf-u.li:3
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;nginx: configuration file /etc/nginx/nginx.conf test failed
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Was war passiert? Ich hatte zweimal (in verschiedenen vhosts) bei &amp;ldquo;listen&amp;rdquo; den port 443 mit den optionen, u.a. ssl und spdy, versehen:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Vhost 1:&lt;/strong&gt;&lt;/p&gt;</description>
      
         <content:encoded><![CDATA[<p>Soeben habe ich auf einen zweiten Host SSL konfiguriert. Plattform ist ein nginx webserver gewesen, der mir beim Konfigurationstest folgenden Fehler ausspuckte:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-plaintext" data-lang="plaintext"><span class="line"><span class="cl">[....] Testing nginx configuration:Configuration test failed!
</span></span><span class="line"><span class="cl">nginx: [emerg] duplicate listen options for [::]:443 in /etc/nginx/sites-enabled/wolf-u.li:3
</span></span><span class="line"><span class="cl">nginx: configuration file /etc/nginx/nginx.conf test failed
</span></span></code></pre></td></tr></table>
</div>
</div><p>Was war passiert? Ich hatte zweimal (in verschiedenen vhosts) bei &ldquo;listen&rdquo; den port 443 mit den optionen, u.a. ssl und spdy, versehen:</p>
<p><strong>Vhost 1:</strong></p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-plaintext" data-lang="plaintext"><span class="line"><span class="cl">listen [::]:443 default_server ssl ipv6only=off spdy;
</span></span></code></pre></td></tr></table>
</div>
</div><p><strong>Vhost 2:</strong></p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-plaintext" data-lang="plaintext"><span class="line"><span class="cl">server {
</span></span><span class="line"><span class="cl">    listen [::]:443 ssl ipv6only=off;
</span></span><span class="line"><span class="cl">}
</span></span></code></pre></td></tr></table>
</div>
</div><p>Das war dem nginx nicht so recht ;) Abhilfe war also nur einmal die optionen festzulegen (also in vhost 1) und im zweiten nur noch:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-plaintext" data-lang="plaintext"><span class="line"><span class="cl">server {
</span></span><span class="line"><span class="cl">    listen [::]:443;
</span></span><span class="line"><span class="cl">}
</span></span></code></pre></td></tr></table>
</div>
</div><p>einzutragen. Schon liefs.</p>
]]></content:encoded>
    </item>
    <item>
      <title>Betrieb von Piwik auf dem Webserver nginx</title>
      
      
      <link>https://wolf-u.li/betrieb-von-piwik-auf-dem-webserver-nginx/</link>
      <pubDate>Mon, 21 Feb 2011 21:47:30 +2100</pubDate>
      <guid>https://wolf-u.li/betrieb-von-piwik-auf-dem-webserver-nginx/</guid>
      <description>&lt;p&gt;&lt;img src=&#34;https://wolf-u.li/upload/2011/02/3943-nginx-piwik.webp&#34; alt=&#34;Piwik auf Nginx&#34; loading=&#34;lazy&#34; title=&#34;Piwik auf Nginx&#34;&gt;&lt;/p&gt;
&lt;p&gt;Auf Facebook hatte Piwik die Frage gestellt, wer ein Tutorial zur Installation von Piwik auf dem Webserver nginx hätte. Da lasse ich mich nicht lang bitten. Dieser Artikel ist Teil einer Reihe zum Webserver nginx. Schau dir auch die anderen Artikel an: &lt;a href=&#34;https://wolf-u.li/3137/leitartikel-zur-konfiguration-und-installation-des-webservers-nginx/&#34;
    title=&#34;Zum Leitartikel&#34; 
   &gt;
  Zum Leitartikel&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Hier meine Config:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt; 1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 6
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 7
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 8
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 9
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;10
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;11
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;12
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;13
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;14
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;15
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;16
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;17
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;server &lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; listen 80&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; server_name stats.yourdomain.tld&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; client_max_body_size 10m&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; client_body_buffer_size 64k&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; error_log /var/log/nginx/stats.yourdomain.tld.log error&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; root /var/www/stats.yourdomain.tld/stats/&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; location ~ &lt;span class=&#34;se&#34;&gt;\.&lt;/span&gt;php$ &lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; fastcgi_pass unix:/tmp/php-fpm.sock&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; include /etc/nginx/fastcgi_params&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; location / &lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; index index.php&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Ein wenig Verständnis zum nginx muss man natürlich mitbringen, aber da ist jetzt wirklich keine Kunst dabei, es einzurichten :)&lt;/p&gt;</description>
      
         <content:encoded><![CDATA[<p><img src="/upload/2011/02/3943-nginx-piwik.webp" alt="Piwik auf Nginx" loading="lazy" title="Piwik auf Nginx"></p>
<p>Auf Facebook hatte Piwik die Frage gestellt, wer ein Tutorial zur Installation von Piwik auf dem Webserver nginx hätte. Da lasse ich mich nicht lang bitten. Dieser Artikel ist Teil einer Reihe zum Webserver nginx. Schau dir auch die anderen Artikel an: <a href="/3137/leitartikel-zur-konfiguration-und-installation-des-webservers-nginx/"
    title="Zum Leitartikel" 
   >
  Zum Leitartikel</a></p>
<p>Hier meine Config:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt"> 1
</span><span class="lnt"> 2
</span><span class="lnt"> 3
</span><span class="lnt"> 4
</span><span class="lnt"> 5
</span><span class="lnt"> 6
</span><span class="lnt"> 7
</span><span class="lnt"> 8
</span><span class="lnt"> 9
</span><span class="lnt">10
</span><span class="lnt">11
</span><span class="lnt">12
</span><span class="lnt">13
</span><span class="lnt">14
</span><span class="lnt">15
</span><span class="lnt">16
</span><span class="lnt">17
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">server <span class="o">{</span>
</span></span><span class="line"><span class="cl"> listen 80<span class="p">;</span>
</span></span><span class="line"><span class="cl"> server_name stats.yourdomain.tld<span class="p">;</span>
</span></span><span class="line"><span class="cl"> client_max_body_size 10m<span class="p">;</span>
</span></span><span class="line"><span class="cl"> client_body_buffer_size 64k<span class="p">;</span>
</span></span><span class="line"><span class="cl"> error_log /var/log/nginx/stats.yourdomain.tld.log error<span class="p">;</span>
</span></span><span class="line"><span class="cl"> root /var/www/stats.yourdomain.tld/stats/<span class="p">;</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"> location ~ <span class="se">\.</span>php$ <span class="o">{</span>
</span></span><span class="line"><span class="cl"> fastcgi_pass unix:/tmp/php-fpm.sock<span class="p">;</span>
</span></span><span class="line"><span class="cl"> include /etc/nginx/fastcgi_params<span class="p">;</span>
</span></span><span class="line"><span class="cl"> <span class="o">}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"> location / <span class="o">{</span>
</span></span><span class="line"><span class="cl"> index index.php<span class="p">;</span>
</span></span><span class="line"><span class="cl"> <span class="o">}</span>
</span></span><span class="line"><span class="cl"><span class="o">}</span>
</span></span></code></pre></td></tr></table>
</div>
</div><p>Ein wenig Verständnis zum nginx muss man natürlich mitbringen, aber da ist jetzt wirklich keine Kunst dabei, es einzurichten :)</p>
]]></content:encoded>
    </item>
  </channel>
</rss>
