Any Mac (whether or not it's running Mac OS X Server) can be used as a web server, and by using built-in or freely available open-source software, your Mac can serve sophisticated, dynamic, database-driven sites. Along with this great power comes risk because running a web server opens your Mac to several potential avenues of attack. This chapter described ways of reducing that risk. I started by covering some of the basic settings you can use to improve your web server's security. I then described the use of HTTP authentication to create realms, which are portions of websites that require users to type credentials before viewing them.
I briefly outlined how to use SSL to encrypt data sent and received from your Mac's web server, and I provided some advice about preventing injection attacks, in which someone uses a web form to install executable software on your Mac. I ended the chapter with a look at securing some of the common database engines frequently used to supply the data for dynamic websites.