You can reinstall os x without formatting or erasing anything. It will reset a lot of your system prefs, and perhaps overwrite any special apache configs, but otherwise all data will be left intact. This is perhaps your best option, and quickest too: a reinstall only takes 20-30 minutes.