• Home
  • Cloud VPS
    • Hong Kong VPS
    • US VPS
  • Dedicated Servers
    • Hong Kong Servers
    • US Servers
    • Singapore Servers
    • Japan Servers
  • Company
    • Contact Us
    • Blog
logo logo
  • Home
  • Cloud VPS
    • Hong Kong VPS
    • US VPS
  • Dedicated Servers
    • Hong Kong Servers
    • US Servers
    • Singapore Servers
    • Japan Servers
  • Company
    • Contact Us
    • Blog
ENEN
  • 简体简体
  • 繁體繁體
Client Area

Nginx Tip – Use the proxy_ssl_protocols directive for SSL protocol selection

December 19, 2023

Nginx Tip – Use the proxy_ssl_protocols directive for SSL protocol selection

When it comes to securing your website or application, using SSL/TLS protocols is crucial. These protocols ensure that the data transmitted between the client and the server is encrypted and secure. Nginx, a popular web server and reverse proxy server, provides various directives to configure SSL/TLS settings. One such directive is proxy_ssl_protocols, which allows you to specify the SSL protocols to be used for proxy connections.

Understanding SSL Protocols

SSL (Secure Sockets Layer) and its successor TLS (Transport Layer Security) are cryptographic protocols that provide secure communication over a network. These protocols establish an encrypted connection between the client and the server, ensuring that the data transmitted remains confidential and tamper-proof.

Over the years, several versions of SSL/TLS protocols have been developed, each with its own strengths and vulnerabilities. The commonly used SSL/TLS protocols include:

  • SSLv3
  • TLSv1.0
  • TLSv1.1
  • TLSv1.2
  • TLSv1.3

While older versions like SSLv3 and TLSv1.0 are considered insecure due to known vulnerabilities, newer versions like TLSv1.2 and TLSv1.3 offer improved security and performance enhancements.

Using the proxy_ssl_protocols Directive

The proxy_ssl_protocols directive in Nginx allows you to specify the SSL protocols that Nginx should use when establishing SSL connections with upstream servers. By default, Nginx uses the protocols supported by the OpenSSL library installed on the server.

To configure the proxy_ssl_protocols directive, you can add it to the http, server, or location context in your Nginx configuration file. Here’s an example:

http {
  # Other configuration directives
  
  proxy_ssl_protocols TLSv1.2 TLSv1.3;
  
  # Other configuration directives
}

In this example, we have specified that Nginx should use only TLSv1.2 and TLSv1.3 protocols for SSL connections with upstream servers. This ensures that older and potentially insecure protocols like SSLv3 and TLSv1.0 are not used.

It is important to note that the proxy_ssl_protocols directive only applies to SSL connections made by Nginx to upstream servers. It does not affect SSL connections made by clients to Nginx itself.

Benefits of Using the proxy_ssl_protocols Directive

By explicitly specifying the SSL protocols to be used with the proxy_ssl_protocols directive, you can:

  • Enhance security: By disabling older and insecure protocols, you reduce the risk of vulnerabilities and ensure that only the latest and most secure protocols are used.
  • Improve performance: Newer SSL protocols like TLSv1.2 and TLSv1.3 offer performance improvements over older protocols, resulting in faster and more efficient SSL connections.
  • Stay up-to-date: As new SSL protocols are developed and older ones become obsolete, you can easily update your Nginx configuration to include the latest protocols.

By leveraging the proxy_ssl_protocols directive, you can ensure that your SSL connections are secure, performant, and up-to-date.

Summary

In conclusion, the proxy_ssl_protocols directive in Nginx allows you to specify the SSL protocols to be used for proxy connections. By configuring this directive, you can enhance the security and performance of your SSL connections. To learn more about SSL/TLS protocols and how to configure Nginx for optimal security, consider exploring Server.HK, a leading VPS hosting provider that offers reliable and secure hosting solutions.

Recent Posts

  • Managing Users and Permissions in CentOS Stream: Best Practices (CentOS Stream 9/10 – 2026)
  • How to Set Up Nginx on CentOS Stream for High-Performance Web Hosting
  • CentOS Stream Explained: Key Differences from CentOS Linux
  • How to Configure FirewallD in CentOS Stream: From Essential to Production-Grade
  • Installing Docker on CentOS: A Practical Setup Guide (CentOS Stream 9/10 – 2026)

Recent Comments

No comments to show.

Knowledge Base

Access detailed guides, tutorials, and resources.

Live Chat

Get instant help 24/7 from our support team.

Send Ticket

Our team typically responds within 10 minutes.

logo
Alipay Cc-paypal Cc-stripe Cc-visa Cc-mastercard Bitcoin
Cloud VPS
  • Hong Kong VPS
  • US VPS
Dedicated Servers
  • Hong Kong Servers
  • US Servers
  • Singapore Servers
  • Japan Servers
More
  • Contact Us
  • Blog
  • Legal
© 2026 Server.HK | Hosting Limited, Hong Kong | Company Registration No. 77008912
Telegram
Telegram @ServerHKBot