The ideal distance between the camera and the subject for a portrait is about 5m. Thats because thats the inner image we have stored in our brain of people and thus looks most natural to us. In reallife we will compensate from this image thanks to our ability to see in 3D, however with a flat photographed image thats not possible.
From this distance the focal lengths to use can be computed; about 70mm for a full body portrait and about 300mm for a face only portrait.
People with flat features, such as asians, can easily be photographed on a shorter distance, while other people with strong features will benefit from even longer distances.
That said these are the rules specifically for portraits that are supposed to make people look especially good - but any focal can and has been used for portraiture. Very popular right now is for example the up close portrait with a 28mm. Thats because thats what selfies with a smartphone look like.
A lot of GOOD comments in SOlarflare's brief post above. I agree with his ideas on this mostly.
Insttead of an ideal distance, I would state it in reverse: NEVER shoot a portrait of a person at less than 7 feet, minimum, and 10 feet is better by far. Longer lens length is better than closer-up with a short lens.
As far as the "best portrait lens" for an APS-C camera? That would be a tele-zoom, like a 70-300mm (inexpensive) or 70-200mm, or lacking those a 50-200 or 55-250, something in that range. SO, we have basically three price clases of tele-zoom, the economy, the mid- and the high-end lenses.
AS far as single focal length lenses, for most people the best one-lens option would be Canon's very nice 85mm f/1.8 EF lens: sharp, good,affordable, and long enough to give a nice, narrow-angle background.
A tele-zoom lens like a 70-300mm gives you: DIFFERENT background angles (different width of background) behgind the portrait subject. At 70mm, the angle behind the subject is wide; at 300mm, the angle of view behind the subject is narrow. Background control is where zoom lenses make things easier and better for the photographer. If you make a half-body (waist to head) shot at 70mm and one at 300mm, there will be two very different "looks" to the background, even though the person is shown at the same size within the picture!