avatar

ShīnChvën ✨

Effective Accelerationism

Powered by Druid

Fix Nginx SSL Permission Denied (0200100D) error

Sat Oct 08 2022

If you see Nginx SSL Error 0200100D like below, it means that Nginx is not allowed to access the SSL certificate file. This is usually a SELinux issue. You can fix it by using restorecon command to restore the SELinux context of the certificate file.

nginx: [emerg] cannot load certificate "/etc/nginx/ssl/cert.pem": BIO_new_file() failed (SSL: error:0200100D:system library:fopen:Permission denied:fopen('/etc/nginx/ssl/cert.pem',...ew_file:system lib)

Check If SELinux Is Enabled

sestatus
# output
SELinux status:                 enabled

Restore SELinux Security Contexts to Fix Permission

restorecon /etc/nginx/ssl/*