Use bcrypt whenever possible, it's the strongest, with a salt and cost factor, and supported by Apache (2.4+) and by Nginx with bcrypt. apr1 (Apache MD5) is a compatible alternative for older servers, but weaker. SHA (SHA-1 without a salt) is fragile and is here only for legacy compatibility; avoid it in production.