RASPBERRY WEBSERVER (Posted 2014-09-10 20:05:57 by corey_reichle) The site is no longer hosted on a RPi... Sadly, hosting more than one site on it was pretty slow, and so I've migrated it to a 1U server I had laying about. So, while looking to trim a bit of cost, I've been looking into how my web hosting plays in. Now, the hosting plan I use isn't all that pricey ($99/year), I figure I can trim that down a bit. I use PmWiki as the CMS for this site, but I don't really need a dynamically compiled page every time. I just like the ease of editing the site that comes with a CMS. So, I grabbed down the site, configured a nightly sync using lftp to mirror the site contents down (Actual code) onto a Raspberry Pi. Then, I went to work configuring apache2. It _worked_, but not so great. Page rendering was kinda slow. So, my next plan of attack was to switch to lighttpd. After learning a bit about how different apache and lighttpd's mod_rewrite works (See those pretty URL's in the address bar? mod_rewrite rules). After all that, performance might have been a little better. Research led me down some holes: APC Cache, XCache, Varnish even... blech. But then, a light bulb went off: How about just serving the site as static content, and rebuild the site periodically? So, that's where I'm at now: I've got the new vhost configured, and working on setting up the static content to be served. Initial tests show it to be slamming in performance on the Raspberry Pi. I can set it so it rebuilds the site contents once an hour or so. I don't need instant page changes. Just for comparison, the following are the copies of this site, hosted on the RPi: Static versison: http://static.coreyreichle.com [ http://static.coreyreichle.com/ ] Dynamic, live: http://dynamic.coreyreichle.com [ http://dynamic.coreyreichle.com/ ] The dynamic site performance isn't all that different from this version, just a bit of initial lag during render. The static version is (Obviously) slamming. -------- There is 1 comment on this post: Comment #1 by Carl ( audrey.hebert@gmail.com ) on 2015-11-27 18:00:56 Great article. To submit a comment on this post, email corey.reichle@gmail.com or visit us on the web [ https://www.coreyreichle.com ].