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

<channel>
	<title>Zipfelmaus &#187; Lighttpd</title>
	<atom:link href="http://www.zipfelmaus.com/blog/tag/lighttpd/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.zipfelmaus.com</link>
	<description>wie zipfelig</description>
	<lastBuildDate>Tue, 07 Feb 2012 18:12:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Arduino Ethernet Shield. Issues with Lighttpd and/or router. How to get the example code running.</title>
		<link>http://www.zipfelmaus.com/blog/arduino-ethernet-shield-how-to-get-the-example-code-running/</link>
		<comments>http://www.zipfelmaus.com/blog/arduino-ethernet-shield-how-to-get-the-example-code-running/#comments</comments>
		<pubDate>Thu, 24 Sep 2009 17:07:46 +0000</pubDate>
		<dc:creator>Rocu</dc:creator>
				<category><![CDATA[Allgemeines]]></category>
		<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Ethernet]]></category>
		<category><![CDATA[Lighttpd]]></category>
		<category><![CDATA[Problem]]></category>
		<category><![CDATA[Router]]></category>
		<category><![CDATA[Shield]]></category>

		<guid isPermaLink="false">http://www.zipfelmaus.com/?p=1137</guid>
		<description><![CDATA[A few days ago i tried to get the WebClient example in Arduino working. After some hours of frustration I finally stopped working and googled for a solution. Soon I realized that I was not the only person having this problem. The example code does not work behind a router. (UPDATE: It does also has [...]
Verwandte Artikel:<ol>
<li><a href='http://www.zipfelmaus.com/blog/arduino-ethernetshield-shaun-inmans-mint-lcd-display-zipfelmint/' rel='bookmark' title='Arduino + EthernetShield + Shaun Inman&#8217;s Mint + LCD-Display = ZipfelMint'>Arduino + EthernetShield + Shaun Inman&#8217;s Mint + LCD-Display = ZipfelMint</a></li>
<li><a href='http://www.zipfelmaus.com/blog/arduino-weather-shield-schematics-layout-code-everything-you-need/' rel='bookmark' title='Arduino: Weather-Shield &#8211; schematics, layout, code, &#8230; &#8211; everything you need'>Arduino: Weather-Shield &#8211; schematics, layout, code, &#8230; &#8211; everything you need</a></li>
<li><a href='http://www.zipfelmaus.com/blog/arduino-with-hall-sensor/' rel='bookmark' title='Arduino with hall sensor'>Arduino with hall sensor</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>A few days ago i tried to get the WebClient example in Arduino working. After some hours of frustration I finally stopped working and googled for a solution. Soon I realized that I was not the only person having this problem. The <a href="http://www.arduino.cc/en/Reference/Ethernet">example code</a> does not work behind a router.</p>
<p>(UPDATE: It does also has issues with Lighttpd &#8211; Fix in the second example)</p>
<div id="attachment_1140" class="wp-caption alignnone" style="width: 589px"><a href="http://www.flickr.com/photos/mbiddulph/2398504278/sizes/l/"><img src="http://www.zipfelmaus.com/wp-content/uploads/2009/09/2398504278_75edbeeb0e_b1.jpg" alt="Arduino with Ethernet Shield (Matt Biddulph / Flickr)" title="2398504278_75edbeeb0e_b" width="579" height="434" class="size-full wp-image-1140" /></a><p class="wp-caption-text">Arduino with Ethernet Shield (Matt Biddulph / Flickr)</p></div>
<p>The solution was easy. I found it in the german book &#8220;Arduino &#8211; Physical Computing für Bastler, Designer &#038; Geeks&#8221;. The Ethernet.beginn() method takes 2 more optional parameters:</p>
<p><strong><a href="http://arduino.cc/en/Reference/EthernetBegin">Ethernet.begin(mac, ip, gateway, subnet);</a></strong></p>
<p>That was not mentioned in the example code and obviously i was not the only person that had troubles because of this little mistake.</p>
<p>I propose to add a hint to the example or to change it, since a router is the normal case for an Arduino.</p>
<p>Here is my slightly modified version of the example code that finally worked <img src='http://www.zipfelmaus.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<pre class="brush: cpp; title: ; notranslate">
#include &lt;Ethernet.h&gt;

byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
byte ip[] = { 192, 168, 178, 25 };
byte gateway[] = { 192, 168, 178, 1 };
byte server[] = { 74, 125, 77, 104  }; // Google

Client client(server, 80);

void setup()
{
  Ethernet.begin(mac, ip, gateway);
  Serial.begin(9600);

  delay(1000);

  Serial.println(&quot;connecting...&quot;);

  if (client.connect()) {
    Serial.println(&quot;connected&quot;);
    client.println(&quot;GET /search?q=arduino HTTP/1.0&quot;);
    client.println();
  } else {
    Serial.println(&quot;connection failed&quot;);
  }
}

void loop()
{
  if (client.available()) {
    char c = client.read();
    Serial.print(c);
  }

  if (!client.connected()) {
    Serial.println();
    Serial.println(&quot;disconnecting.&quot;);
    client.stop();
    for(;;)
      ;
  }
}
</pre>
<h2>UPDATE:</h2>
<p>The Ethernet Library does not work with Lighttpd. You can however easily circumvent this if you use a HTTP-proxy server.<br />
You have to set server variable to the IP of the proxy and send something like the following example to the proxy. The rest works  pretty much the same then..</p>
<pre class="brush: cpp; title: ; notranslate">
    client.println(&quot;GET http://www.google.com/search?q=arduino HTTP/1.0&quot;);
    client.println(&quot;host: www.google.com&quot;); // You have to send a host-header for many domains
    client.println();
</pre>
<p>Verwandte Artikel:<ol>
<li><a href='http://www.zipfelmaus.com/blog/arduino-ethernetshield-shaun-inmans-mint-lcd-display-zipfelmint/' rel='bookmark' title='Arduino + EthernetShield + Shaun Inman&#8217;s Mint + LCD-Display = ZipfelMint'>Arduino + EthernetShield + Shaun Inman&#8217;s Mint + LCD-Display = ZipfelMint</a></li>
<li><a href='http://www.zipfelmaus.com/blog/arduino-weather-shield-schematics-layout-code-everything-you-need/' rel='bookmark' title='Arduino: Weather-Shield &#8211; schematics, layout, code, &#8230; &#8211; everything you need'>Arduino: Weather-Shield &#8211; schematics, layout, code, &#8230; &#8211; everything you need</a></li>
<li><a href='http://www.zipfelmaus.com/blog/arduino-with-hall-sensor/' rel='bookmark' title='Arduino with hall sensor'>Arduino with hall sensor</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.zipfelmaus.com/blog/arduino-ethernet-shield-how-to-get-the-example-code-running/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>glTail &#8211; So macht Logfiles auswerten Spaß</title>
		<link>http://www.zipfelmaus.com/blog/gltail-so-macht-logfiles-auswerten-spas/</link>
		<comments>http://www.zipfelmaus.com/blog/gltail-so-macht-logfiles-auswerten-spas/#comments</comments>
		<pubDate>Sat, 22 Nov 2008 08:29:09 +0000</pubDate>
		<dc:creator>Rocu</dc:creator>
				<category><![CDATA[Webkram]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[gl_tail]]></category>
		<category><![CDATA[Lighttpd]]></category>
		<category><![CDATA[Logfiles]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Squid]]></category>

		<guid isPermaLink="false">http://web2.0du.de/?p=220</guid>
		<description><![CDATA[Eine wichtige Aufgabe von mir als Webprogrammierer besteht darin regelmäßig zu schauen, wie YiGG genutzt wird und ob es dabei zu Auffälligkeiten kommt. Da es angesichts der tausenden Requests pro Minute relativ schwierig bis unmöglich ist dieser Aufgabe mit einem tail -f beizubekommen, habe ich mich vor einiger Zeit nach Alternativen umgesehen. Hängengeblieben bin ich [...]
Verwandte Artikel:<ol>
<li><a href='http://www.zipfelmaus.com/blog/twitter-irgendwie-machts-doch-spas/' rel='bookmark' title='Twitter &#8211; irgendwie machts doch Spaß.'>Twitter &#8211; irgendwie machts doch Spaß.</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Eine wichtige Aufgabe von mir als Webprogrammierer besteht darin regelmäßig zu schauen, wie YiGG genutzt wird und ob es dabei zu Auffälligkeiten kommt.</p>
<p>Da es angesichts der tausenden Requests pro Minute relativ schwierig bis unmöglich ist dieser Aufgabe mit einem tail -f beizubekommen, habe ich mich vor einiger Zeit nach Alternativen umgesehen.</p>
<p>Hängengeblieben bin ich bei gl_tail einem Programm in ruby, dass die Logfiles wirklich sehr nett darstellt:</p>
<p><object width="606" height="491"><param name="movie" value="http://www.youtube.com/v/yfNHDYqk8j0&#038;hl=de&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/yfNHDYqk8j0&#038;hl=de&#038;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="606" height="491"></embed></object></p>
<p>Installieren kann man sich gl_tail unter Mac OS X ohne Probleme, da es in Ruby geschrieben ist. Mit einem einfachen:</p>
<p><strong>sudo gem install gltail</strong></p>
<p>Hat man das nette Programm auf seiner Festplatte &#8211; vorrausgesetzt man hat XCode bei sich installiert, welchen man auf seiner Mac OS X-CD findet. GLTail benötigt den bei XCode mitgeliferten C-Compiler, damit es sich eine native OpenGL Bibliothek zusammenbasteln kann.</p>
<p>Gestartet wird das Programm dann im Terminal mit gl_tail, wobei man beim ersten Aufruf eine kleine YAML-Konfigurationsdatei zusammenbasteln muss. Es lassen sich natürlich viel mehr als ein Log zum beobachten angeben.</p>
<p>Das Programm versteht sich natürlich auf eine ganze Menge mehr Logfiles als auf die Apache-Logs &#8211; ihr könnt zum Beispiel Sendmail, Ruby und Squid-Logs auch zu bunten Bällchen machen.</p>
<p>So und jetzt wünsch ich euch einen schönen verschneiten Samstag.</p>
<p>Verwandte Artikel:<ol>
<li><a href='http://www.zipfelmaus.com/blog/twitter-irgendwie-machts-doch-spas/' rel='bookmark' title='Twitter &#8211; irgendwie machts doch Spaß.'>Twitter &#8211; irgendwie machts doch Spaß.</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.zipfelmaus.com/blog/gltail-so-macht-logfiles-auswerten-spas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Metabloging</title>
		<link>http://www.zipfelmaus.com/blog/metabloging/</link>
		<comments>http://www.zipfelmaus.com/blog/metabloging/#comments</comments>
		<pubDate>Thu, 13 Nov 2008 21:53:40 +0000</pubDate>
		<dc:creator>Rocu</dc:creator>
				<category><![CDATA[Webkram]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[FastCGI]]></category>
		<category><![CDATA[Lighttpd]]></category>
		<category><![CDATA[Magnet]]></category>
		<category><![CDATA[Metablogging]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[Supercache]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://web2.0du.de/?p=51</guid>
		<description><![CDATA[Es gibt nichts schöneres als sich mit dem basteln an seinem Blog zu befassen und daher habe ich mein Blog heute ofiziell auf Worpress umgestellt. Ich habe es inzwischen ganz nach Hause auf mein Macbook umgezogen, wo es brav seine Dienste verrichtet. Die statischen Inhalte kommen zum Teil von einem sehr billigen Webhostingpaket bei 1&#38;1. [...]
Verwandte Artikel:<ol>
<li><a href='http://www.zipfelmaus.com/blog/arduino-ethernet-shield-how-to-get-the-example-code-running/' rel='bookmark' title='Arduino Ethernet Shield. Issues with Lighttpd and/or router. How to get the example code running.'>Arduino Ethernet Shield. Issues with Lighttpd and/or router. How to get the example code running.</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Es gibt nichts schöneres als sich mit dem basteln an seinem Blog zu befassen und daher habe ich mein Blog heute ofiziell auf Worpress umgestellt. Ich habe es inzwischen ganz nach Hause auf mein Macbook umgezogen, wo es brav seine Dienste verrichtet. Die statischen Inhalte kommen zum Teil von einem sehr billigen Webhostingpaket bei 1&amp;1.</p>
<p>Auf meinem Macbook habe ich ein VMware-Image mit Ubuntu+Lighttpd- APM+Magnet+FastCgi aufgesetz, das ganze ist zwar etwas tricky, ist aber mit Googlei in etwa 2 Stunden erledigt gewesen.</p>
<p>Danach habe ich das Plugin Supercache eingespielt. Hilfreich dabei war dieses Snippet von <a href="http://tempe.st/2008/05/lightning-speed-wordpress-with-lighttpd-and-supercache-part-ii/">A Tempest of Thougts</a>.</p>
<p>Hier das Ergebniss: Finde ich sehr anständig <img src='http://www.zipfelmaus.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>noname:~ shostakovich$ ab -c 4 -n 5000 http://web2.0du.de/<br />
This is ApacheBench, Version 2.3 &lt;$Revision: 655654 $&gt;<br />
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/<br />
Licensed to The Apache Software Foundation, http://www.apache.org/</p>
<p>Benchmarking web2.0du.de (be patient)</p>
<p>Completed 500 requests (..)<br />
Finished 5000 requests</p>
<p>Server Software:        lighttpd/1.4.19</p>
<p>Server Hostname:        web2.0du.de</p>
<p>Server Port:            80</p>
<p>Document Path:          /<br />
Document Length:        24574 bytes</p>
<p>Concurrency Level:      4<br />
Time taken for tests:   160.447 seconds<br />
Complete requests:      5000<br />
Failed requests:        0<br />
Write errors:           0<br />
Total transferred:      123977425 bytes<br />
HTML transferred:       122870000 bytes<br />
Requests per second:    31.16 [#/sec] (mean)<br />
Time per request:       128.357 [ms] (mean)<br />
Time per request:       32.089 [ms] (mean, across all concurrent requests)<br />
Transfer rate:          754.59 [Kbytes/sec] received</p>
<p>Connection Times (ms)<br />
min  mean[+/-sd] median   max<br />
Connect:        4   41 537.5     22   19020<br />
Processing:    21   88  19.3     84     416<br />
Waiting:        5   20  11.2     18     339<br />
Total:         54  128 538.9    105   19299</p>
<p>Percentage of the requests served within a certain time (ms)<br />
50%    105<br />
66%    114<br />
75%    120<br />
80%    127<br />
90%    151<br />
95%    160<br />
98%    171<br />
99%    180<br />
100%  252 (longest request)</p>
<p>Last but not least: Lighttpd loggt keine Daten mehr. Irgenwo habe ich doch mal so eine nette Plakette gesehen, wo gibts die?</p>
<p>Verwandte Artikel:<ol>
<li><a href='http://www.zipfelmaus.com/blog/arduino-ethernet-shield-how-to-get-the-example-code-running/' rel='bookmark' title='Arduino Ethernet Shield. Issues with Lighttpd and/or router. How to get the example code running.'>Arduino Ethernet Shield. Issues with Lighttpd and/or router. How to get the example code running.</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.zipfelmaus.com/blog/metabloging/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

