The key to not losing everything in one fell swoop is to keep everything separated. If you do not have any special holder for your passport or wallet, at least keep them far from each other on your person. That way, if one is stolen, you still have the other. Do not keep them in obvious places, like your back pocket. The best places to store these items are the sock, a shirt pocket or a front pants pocket, as long as it is deep and does not open from the side.
If you are able to wear a jacket, the inside pockets are a more secure place to keep your passport and wallet, so long as you don't remove the jacket. Any zippered pocket can be a secure place to keep your items, but keep the pocket in your line of sight. A zipper involves more work, which makes it harder for a pickpocket to steal your valuables -- but not impossible.
Most travel sites recommend money belts by most travel sites, as do the U.S. consular offices and Ordinary Traveler, as they are very secure and easy to use. Money belts are thin, zippered pouches -- similar to fanny packs -- usually worn on the inside of a shirt or pants, at the waist. Some designs look like regular belts, to be worn as such, and have a small zippered area in which to hide money and paper, but are too small to hold anything else (like your passport or wallet).
Christopher Reynolds, of the Los Angeles Times, wrote an article called, "6 Discreet Holders to Keep Your Passport Safe," which features inventive items for traveling. The featured items include the Micropack Explorer wallet, which is similar to a money belt, but it clamps on to the front of your pants, shorts or skirts that do not have belt loops. Another is the Pacsafe Walletsafe 100, which includes zippered compartments and a chain that you can attach to anything on your person. For people without pockets, get the Pacsafe Pouchsafe 100, a small pouch attached to a nylon-coated, adjustable wire that you hang around the neck and under a shirt. Another product available, for women, is the Personal Bra Stash Bra Pouch, a small pouch only big enough to hold money and credit cards, which is attached to the front of the bra.