Learns best in practice. Take VPS put in it everything you need to work Your website.
This will be Your ground for testing.
And begin to "torture" the server.
Thus You will begin to understand more or less how to protect your server.
Gather initial information on this resource: codeby.net