Err_cert_common_name_invalid

is this snippet somewhere in your nginx config or did you comment it out?