You now have a secure, optimised and entirely self-hosted server set up that you can run MySQL and PHP applications on top of. It's accessible from your local network and also from the world wide web. You can host any number of sites on it by repeating the "Setting up your first website" steps again (up until the Pi or your home internet connection run out of resources anyway).

Bonus Material: SSL and Subdomains

UPDATE: I have recently written a new article on how to get your site running over HTTPS/SPDY which may be useful to you. Now, back to the original article…

Ok, this is all good but there is one major flaw if you are intending (like me) to use the Pi as a controller for your home: there's a possibility you'll end up having some pretty sensitive information on the Pi (or available through it), and while it would be cool to have some public access for the curious, you'll want many aspects of the system behind some form of authentication. You'll want sensitive parts additionally secured in terms of file access on the Pi itself, and you will want the connection encrypted to stop any hackers that might be interested in gaining access to such a system. Let's pretend that we've set up mysite.com to show material we're happy for the world to see; maybe showing off a few graphs and details of the home automation project – essentially a 'read only' website we're happy to host for public consumption. Now we want to set up a part only we have access to and which we can use to get additional information and/or control aspects of the automated home – i.e., log in and turn the central heating off because we think we left it on earlier. Or check the webcam to see if the dog is OK. Or to see if the postman has been and left a parcel we're expecting. Or any of that cool stuff you might want a smart home to do… The best way seems to me to use a sub-domain for that (http://something.mydomain.com). Setting up a sub-domain is easy; as far as nginx is concerned there's no difference between a main domain and a sub domain; they're treated identically. Just follow the steps above for setting up the main site but substitute your sub-domain as you go (where we used 'mysite.com' instead use 'whatever.mysite.com'). Then, to get a secure encrypted connection for that sub domain, you need to follow these instructions from HTTPS Everywhere at HasGeek.com. There's no point in me regurgitating that post as this is an area where I know very little and so have little more that I could add. Good luck!