If you're running a website or web application using Nginx, you may encounter errors that can disrupt your site's functionality. Fortunately, many of these errors have straightforward solutions that can be implemented quickly and easily. In this guide, we'll explore some of the most common Nginx errors and provide solutions to help you overcome them.
Each error is organized with an example nginx error and explanation to the error cause. Next to it there is a solution backed by a link to the documentation - where possible.
This guide is a living document and is constantly updated.
Error while SSL handshaking in Nginx
This is a common issue for proxy servers. You might encounter a following error in the Nginx error log:
SSL_do_handshake() failed (SSL: error:14201044:SSL routines:tls_choose_sigalg:internal error) while SSL handshaking, client: 1.2.3.4, server: 0.0.0.0:443)
Solution to SSL_do_handshake() failed with Nginx proxy
Simply enable passing of the server name through TLS Server Name Indication extension (SNI) in the proxy server config section:
proxy_ssl_server_name on;
Example server config snippet:
# file: /etc/nginx/sites-available/{YOUR_WEBSITE}
location / {
proxy_pass http://127.0.0.1:4000;
# Add next line
proxy_ssl_server_name on;
# Rest of the config
}
Read more about proxy_ssl_server_name in the Nginx documentation.