So I have a need for web hosting, not just for my own blog but also for a Scout group I’m involved in. There are cloud based web hosting options, either paid for, or free but with adverts. However, hosting using my own hardware is free and more challenging. Of course, if get to the point of hundreds of hits per minute, I will be needing to look at externally hosted. In the meantime, here is a rough description of what I have setup. I may avoid some specific details for security reasons.
So this one’s using a Raspberry Pi 2. More RAM and CPU power than the original so better for web hosting. To make things even better, I decided to put the OS onto a USB hard drive as well as the web files. I referenced several different articles to work out how to do this. I like to reference several different articles when doing a task like this so as to make sure I’ve covered the topic as thoroughly as possible. Some are listed below:
But probably the one I referenced the most was:
The Web Server
Nginx and PHP
So the default choice of web server is Apache. However, I had read some good things about Nginx. Some say it is faster and lighter – the debate seems to continue. I had used it previously on the Minecraft Controlled Christmas Tree project with success. However, this time I wanted to be able to host multiple servers so had to learn how to handle them. Apache calls them virtual hosts. However, Nginx calls them server blocks.
I referenced a couple of good articles to get Nginx installed. WordPress requires PHP so these generally include it in the same article. Firstly there is an official Raspberry Pi foundation one and then these:
However, my favourite was:
WordPress and MySQL
Once I had the web server platform installed, it was time to install MySQL and WordPress.
Again, I referenced several articles:
However, my favourite was again from Ste Wright: