I don't see the issue with "hacks" here, but if you by any random chance meant "How to protect against crackers?", I'd advise researching every software component, their options and possible security strategies before opening the machine to the world.
Review your settings, make sure you're keeping it simple (e.g. don't install apache if you just want to serve a bunch of static files, a simpler, light-weight webserver will do too, while having less potential attack vectors; don't install PHP if you don't need dynamic pages (or at least if your dynamic pages can be coded using something simpler than PHP)).
About fighting attacks, be ready for users named, like, Robert'); DROP TABLE Students;--), and so on.
Security is never as simple as "just keep it up-to-date" — it may even be easier to keep track of security if you pick a security-and-stability-centric distro and update packages only when there's some vulnerability that affects your setup or a feature you really need — this way you can build your system somewhere else and use a frozen copy of directories under
/ (for those which shouldn't change) in your server system (either it is really impossible to change files there, or you can at least compare checksums with a previously computed list of known-good checksums).
It is all about a set of choices you have to make before opening the system to the world.