A couple of months ago I started a new side project: Reggae CDMX. Clearly inspired by the popular but very local website reggae-freiburg.de.vu, it's a collection of all local events that are related to Reggae, Dub or Ska music and culture.
I'm building this site with the amazing Kirby CMS_, and it is a great opportunity for me to learn.
So what are some things that I have leaned about so far?
I never intended to learn any PHP, or at least not seriously. Well, that doesn't work if you want to build cool things.
nginx directive for cachebuster plugin.
Structured data for events.
Kirby: controllers vs pagemodell vs pagemethods
The author of Kirby himself provides a small Kirby Cachebuster_ plugin. The proposed rewrite rules for Nginx did not work for me. So I googled a little bit and realised that the utilized cache busting technique is a standard way of doing this, not just when using Kirby. The Nginx rules that work for me are::
Napster war super. Napster war für mich die glorreiche Zeit der
Musikentdeckungen. Durch die Suche nach Cover-Versionen habe ich viele
großartige Künstler erst kennengelernt. Nach einer langen Durststrecke
post-napster machen dies heute Spotify & Co wieder möglich. Dennoch war
die Zeit speziell.
Meine Lieblingsgeschichte ist, wie einmal in der Harald Schmidt Show
Sasha zu Gast war (der später unter dem Namen Dick Brave berühmt werden
sollte). Zum Abschluss der Sendung sang er mit der Studioband den Song
"Hard To Handle". Es war großartig.
Sasha ist es also zu verdanken, dass auch ich Otis Redding kennenlernte:
Es kann gut sein, dass ich damals auch zum ersten Mal Toots & The
Maytals hörte. Auf die Reggae-Schiene kam ich aber erst 2005, als ich in
Freiburg die Uplifters mitgründete.
Die eindrücklichste Version kam allerdings von der mir damals völlig
unbekannten Band The Black Crowes. Die genaue Aufnahme finde ich bei
YouTube nicht, aber sie spielen auch heute noch gut:
There are excellent shared web hosting providers out there. Personally I prefer and recommend Uberspace and domainFactory, if you are located in Europe and you speak German, and DreamHost, if you are living in North America. But even these are not perfect.
While researching WordPress topics, I constantly noticed mentions of nginx, PHP-FPM, APC and memcached. Also, people are talking about fast WordPress site. Like, really fast. I wanted that, too, but a shared hosting provider can’t deliver this. Maybe DreamHost’s DreamPress WordPress hosting service does, but considering the number large of sites I manage, it’s too expensive for me.
So I began researching about how to set up my own web server. Many of the better tutorials I found on digitalocean.com. Only later I discovered that DigitalOcean offers Virtual Private Servers in several data centers around the world for a very good price. And today, I am a happy customer of theirs with VPSs in Frankfurt, Germany and San Francisco, USA – for my German and my Mexican clients respectively.
I will not post a detailed tutorial about how to set up a web server, many others have done this before me. But I’d like to link to all the resources that I found useful. These will give a head start to anyone who wishes to try this herself.
If you find anything that’s stupid, ridiculous or even dangerous, please drop me a note!
Initial server setup
It all starts with setting up, and somewhat securing, a virtual private server “droplet” at DigitalOcean. Because I am most familiar with Debian based GNU/Linux systems and because of the many, many existing tutorials, I choose the Ubuntu 14.04 LTS distribution as my server operating system.
An OpCache caches compiled versions of the PHP scripts that e.g. WordPress runs on. This tremendously speeds up any PHP site. With PHP 5.5 came built-in support for the Zend Opcache. which effectively renders other solutions, like APC, obsolete.
To check if the OpCache is running, you can for example use
I am still researching and experimenting with the best setup of user permissions on the server itself. I run sites from several users on the same server, so that’s important. I want my clients to have full access to their files, too. But I also won’t offer shared hosting to everybody. So for now, it’s not a big deal.
my config files
Ideally I would publish all of my configuration files for reference. Maybe I will.
It took me far too long to figure out how to enable IPv6 support in the nginx configuration. When I know why my current settings work, I’ll write about it.
Varnish is a caching server that sits in front of the web server. Although I absolutely don’t need this for the sites I manage, I really want to try it out and play with it.
Many of the sites that I have already moved to my web servers run a lot faster than before, and more reliably as well. Google’s PageSpeed Insights likes them, too. Also, I pay less for my virtual servers than for all the shared hosting accounts.