SSL error during producing own certificate

Hello there, I was trying to produce my own SSL certificate with below command, on my test virtual machine running Alma Linux:

openssl req -new -x509 -nodes -sha1 -days 365 \
 -key /etc/pki/tls/private/server.key \
 -out server.crt

and I have this error msg as result

809B43EC1C7F0000:error:03000098:digital envelope routines:do_sigver_init:invalid digest:crypto/evp/m_sigver.c:343:

any solution/idea?