Overcome Issues with Nginx Configuration.

Nginx errors can be frustrating, but they don't have to be. This guide provides clear solutions to the most common errors.

Picture for Overcome Issues with Nginx Configuration.
Picture by Matt Chad
Author's photo
Matt Chad
May 24, 2023

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.

Consulting avatar

Do you need assistance with your Magento 2 store?

Share this post

Find more posts by tags
Explore all tags