{"id":13981,"date":"2025-01-16T17:51:48","date_gmt":"2025-01-16T12:21:48","guid":{"rendered":"https:\/\/www.skynats.com\/?p=13981"},"modified":"2025-01-16T17:51:49","modified_gmt":"2025-01-16T12:21:49","slug":"how-to-configure-nginx-to-use-tls-1-2-1-3","status":"publish","type":"post","link":"https:\/\/www.skynats.com\/blog\/how-to-configure-nginx-to-use-tls-1-2-1-3\/","title":{"rendered":"How To Configure Nginx to Use TLS 1.2 \/ 1.3 Only"},"content":{"rendered":"\n<h2 class=\"wp-block-heading has-small-font-size\" id=\"h-introduction\">Introduction<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Transport Layer Security (TLS) is a security technology that protects data when transmitted over the internet. It encrypts the information so that only the intended recipient can read it, keeping it safe from hackers or anyone else trying to snoop. Understanding how to configure Nginx to use TLS 1.2 \/ 1.3 is essential for enhancing server security, as these versions provide stronger encryption and improved performance. Configuring <a href=\"https:\/\/nginx.org\/\" target=\"_blank\" rel=\"noopener\">Nginx<\/a> to use only TLS 1.2 and 1.3 ensures robust security by disabling older, vulnerable protocols and protecting your data from potential cyber threats.<\/p>\n\n\n\n<h2 class=\"wp-block-heading has-small-font-size\" id=\"h-what-are-tls-1-2-and-1-3\">What are TLS 1.2 and 1.3?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">TLS 1.2 and TLS 1.3 are cryptographic protocols developed to ensure secure communication over the Internet. Introduced in 2008, TLS 1.2 is still widely used today, thanks to its support for modern encryption techniques and its reliability in protecting data. TLS 1.3, released in 2018, goes a step further by offering improved security and performance. It eliminates outdated features, resulting in faster handshakes and reduced latency while maintaining a higher level of encryption. Both versions are crucial for ensuring safe and efficient data transmission in modern web environments.<\/p>\n\n\n\n<h3 class=\"wp-block-heading has-small-font-size\" id=\"h-minimum-requirements\">Minimum Requirements<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Nginx Version: 1.13.0 or higher.<\/li>\n\n\n\n<li>OpenSSL Version: 1.1.1 or higher.<\/li>\n\n\n\n<li>Access to the Nginx configuration files.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>How to Configure<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Open your Nginx configuration file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#vim \/etc\/nginx\/nginx.conf<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">To configure TLS 1.2 and 1.3, locate or add the ssl_protocols directive under the server block:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ssl_protocols TLSv1.2 TLSv1.3;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">For example, the sample virtual host configuration for the domain &#8220;example.com.&#8221;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>server {\n\n  listen 443 ssl http2;\n  listen &#91;::]:443 ssl http2;\n\n  server_name example.com;\n  root \/var\/www\/example.com\/public;\n\n  ssl_certificate \/path\/to\/your\/certificate.crt;\n  ssl_certificate_key \/path\/to\/your\/private.key;\n\n  ssl_protocols TLSv1.2 TLSv1.3;\n\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Save and exit the file.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Test the configuration:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#nginx -t<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Reload Nginx:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#systemctl reload nginx<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading has-small-font-size\">Check TLS 1.2 and 1.3 are enabled&nbsp;<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">To check that TLS 1.2 and 1.3 are enabled, you can use an online SSL checker or the OpenSSL command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#curl -v https:\/\/example.com\/<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading has-small-font-size\">Conclusion<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Enabling only TLS 1.2 and 1.3 significantly enhances your server&#8217;s security by preventing vulnerabilities associated with older protocols. To ensure ongoing security and performance, regularly update Nginx and OpenSSL to stay aligned with the latest standards. For more details on how to configure Nginx to use TLS 1.2 \/ 1.3 or if you need assistance with server configuration, contact a trusted <a href=\"https:\/\/www.skynats.com\/blog\/\">server management company<\/a> for expert support.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction Transport Layer Security (TLS) is a security technology that protects data when transmitted over the internet. It encrypts the information so that only the intended recipient can read it, keeping it safe from hackers or anyone else trying to snoop. Understanding how to configure Nginx to use TLS 1.2 \/ 1.3 is essential for [&hellip;]<\/p>\n","protected":false},"author":13,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[951,43],"class_list":["post-13981","post","type-post","status-publish","format-standard","hentry","category-blog","tag-configure-nginx-to-use-tls-1-2-1-3-only","tag-nginx"],"_links":{"self":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts\/13981","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/comments?post=13981"}],"version-history":[{"count":0,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts\/13981\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/media?parent=13981"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/categories?post=13981"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/tags?post=13981"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}