Custom Environmental Settings
Yes it's absolutely possible, and available out of the box with craft.

In your public/index.php file you specify the different environments based on your server name.

With the environment set, inside your craft/config/db.php and craft/config/general.php files, you can create different configurations for each environment.

This article in the craft documentation goes over how to configure it. Let me know if you have any trouble, it's really just modifying those three files.

http://buildwithcraft.com/docs/multi-environment-configs