{"id":40354,"date":"2022-03-23T12:30:00","date_gmt":"2022-03-23T17:30:00","guid":{"rendered":"https:\/\/www.rosehosting.com\/blog\/?p=40354"},"modified":"2022-06-03T03:31:23","modified_gmt":"2022-06-03T08:31:23","slug":"how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20-04","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20-04\/","title":{"rendered":"How To Secure Nginx with Let&#8217;s Encrypt on Ubuntu 20.04"},"content":{"rendered":"<div id=\"bsf_rt_marker\"><\/div>\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"742\" height=\"372\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/02\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20.04.jpg\" alt=\"how to secure nginx with let's encrypt on ubuntu 20.04\" class=\"wp-image-40534\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/02\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20.04.jpg 742w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/02\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20.04-300x150.jpg 300w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/02\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20.04-150x75.jpg 150w\" sizes=\"(max-width: 742px) 100vw, 742px\" \/><\/figure>\n\n\n\n<p>Securing a website running with Nginx as a web server can be done with Let&#8217;s Encrypt, and that is why we are writing this tutorial for you.<\/p>\n\n\n\n<p>Let&#8217;s Encrypt is a Certificate Authority that provides free TLS\/SSL certificates valid for 90 days. SSL stands for Secure Sockets Layer and an SSL certificate is a digital certificate that enables encrypted connection and authentication of the website identity. In this blog post, we will use Certbot to obtain a free SSL certificate for Nginx.<\/p>\n\n\n\n<p><a href=\"https:\/\/www.rosehosting.com\/ubuntu-hosting.html\">Installing Free Let&#8217;s Encrypt SSL certificate on Ubuntu 20.04<\/a> with Certbot is a straightforward process and should take up to 10 minutes. Let&#8217;s get started!<\/p>\n\n\n\n<!--more-->\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-69d4dc8e90a5c\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"ez-toc-cssicon\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-69d4dc8e90a5c\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20-04\/#Prerequisites\" >Prerequisites<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20-04\/#Update-the-System\" >Update the System<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20-04\/#Install-Nginx-Web-Server\" >Install Nginx Web Server<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20-04\/#Create-Nginx-Virtual-Host\" >Create Nginx Virtual Host<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20-04\/#Install-Certbot\" >Install Certbot<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20-04\/#Obtaining-an-SSL-Certificate\" >Obtaining an SSL Certificate<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\" id=\"h-prerequisites\"><span class=\"ez-toc-section\" id=\"Prerequisites\"><\/span>Prerequisites<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>Fresh install of Ubuntu 20.04<\/li><li>User privileges: root or non-root user with sudo privileges<\/li><li>Valid A record of the domain pointed to you server IP addess (yourdomain.com and www.yourdomain.com)<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-update-the-system\"><span class=\"ez-toc-section\" id=\"Update-the-System\"><\/span>Update the System<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Before we start with the installation process we need to update the system to get the latest packages and updates available.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo apt update -y &amp;&amp; sudo apt upgrade -y<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-install-nginx-web-server\"><span class=\"ez-toc-section\" id=\"Install-Nginx-Web-Server\"><\/span>Install Nginx Web Server<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>To install the Nginx web server execute the following commands:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo apt install nginx -y<\/pre>\n\n\n\n<p>Once, the installation is completed, enable and start the Nginx service:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo systemctl enable nginx &amp;&amp; sudo systemctl start nginx<\/pre>\n\n\n\n<p>To check if everything is OK, check the status of the service:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo systemctl status nginx<\/pre>\n\n\n\n<p>You should receive the following output:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">root@vps:~# systemctl status nginx\n\u25cf nginx.service - A high performance web server and a reverse proxy server\n     Loaded: loaded (\/lib\/systemd\/system\/nginx.service; enabled; vendor preset: enabled)\n     Active: active (running) since Sun 2022-02-06 19:34:56 UTC; 11s ago\n       Docs: man:nginx(8)\n    Process: 322857 ExecStartPre=\/usr\/sbin\/nginx -t -q -g daemon on; master_process on; (code=exited, status=0\/SUCCESS)\n    Process: 322858 ExecStart=\/usr\/sbin\/nginx -g daemon on; master_process on; (code=exited, status=0\/SUCCESS)\n   Main PID: 322859 (nginx)\n      Tasks: 5 (limit: 4617)\n     Memory: 5.0M\n     CGroup: \/system.slice\/nginx.service\n             \u251c\u2500322859 nginx: master process \/usr\/sbin\/nginx -g daemon on; master_process on;\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-create-nginx-virtual-host\"><span class=\"ez-toc-section\" id=\"Create-Nginx-Virtual-Host\"><\/span>Create Nginx Virtual Host<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Before we continue with installing Free Let&#8217;s Encrypt we need to create a virtual host file containing our domain name. Go into the Nginx configuration directory and create the file.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">cd \/etc\/nginx\/conf.d\/ &amp;&amp; sudo nano yourdomain.com.conf<\/pre>\n\n\n\n<p>Paste, the following lines of code.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">server {\n        listen 80;\n        root \/var\/www\/html;\n        index  index.php index.html index.htm;\n        server_name yourdomain.com;\n\n        error_log \/var\/log\/nginx\/yourdomain.com_error.log;\n        access_log \/var\/log\/nginx\/yourdomain.com_access.log;\n\n        client_max_body_size 100M;\n        location \/ {\n                try_files $uri $uri\/ \/index.php?$args;\n        }\n}<\/pre>\n\n\n\n<p>Check the Nginx configuration syntax if is OK.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">nginx -t<\/pre>\n\n\n\n<p>You should receive the following output:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">root@vps:\/etc\/nginx\/conf.d# nginx -t\nnginx: the configuration file \/etc\/nginx\/nginx.conf syntax is ok\nnginx: configuration file \/etc\/nginx\/nginx.conf test is successful\n<\/pre>\n\n\n\n<p>If you receive this output you can restart the Nginx service and access your website.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo systemctl restart nginx<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-install-certbot\"><span class=\"ez-toc-section\" id=\"Install-Certbot\"><\/span>Install Certbot<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>At this moment, our website is running over the HTTP protocol. Installing Free Let&#8217;s Encrypt SSL certificate will make our website run securely over the HTTPS protocol. Before we start with obtaining the certificate we need to install the python certbot for Nginx.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo apt install certbot python3-certbot-nginx<\/pre>\n\n\n\n<p>Once, the certbot is installed successfully we can proceed with the main step in this tutorial about obtaining an SSL certificate.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-obtaining-an-ssl-certificate\"><span class=\"ez-toc-section\" id=\"Obtaining-an-SSL-Certificate\"><\/span>Obtaining an SSL Certificate<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>To run the certbot with Nginx plugin specifying the name of your domain execute the following command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo certbot --nginx -d yourdomain.com -d www.yourdomain.com<\/pre>\n\n\n\n<p>After you execute this command there will be a couple of entries that you will need to fill, such as the email address, agreement about the terms and conditions, if you want to share your email adress or not, and the redirect options.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">root@vps:~# sudo certbot --nginx -d yourdomain.com -d www.yourdomain.com\nSaving debug log to \/var\/log\/letsencrypt\/letsencrypt.log\nPlugins selected: Authenticator nginx, Installer nginx\nEnter email address (used for urgent renewal and security notices) (Enter 'c' to\ncancel): <strong>admin@yourdomain.com<\/strong>\n\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPlease read the Terms of Service at\nhttps:\/\/letsencrypt.org\/documents\/LE-SA-v1.2-November-15-2017.pdf. You must\nagree in order to register with the ACME server at\nhttps:\/\/acme-v02.api.letsencrypt.org\/directory\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n(A)gree\/(C)ancel: <strong>A<\/strong>\n\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nWould you be willing to share your email address with the Electronic Frontier\nFoundation, a founding partner of the Let's Encrypt project and the non-profit\norganization that develops Certbot? We'd like to send you email about our work\nencrypting the web, EFF news, campaigns, and ways to support digital freedom.\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n(Y)es\/(N)o: <strong>N<\/strong>\nObtaining a new certificate\nPerforming the following challenges:\nhttp-01 challenge for yourdomain.com\nhttp-01 challenge for www.yourdomain.com\nWaiting for verification...\nCleaning up challenges\nDeploying Certificate to VirtualHost \/etc\/nginx\/conf.d\/example.conf\nDeploying Certificate to VirtualHost \/etc\/nginx\/conf.d\/example.conf\n\nPlease choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access.\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n1: No redirect - Make no further changes to the webserver configuration.\n2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for\nnew sites, or if you're confident your site works on HTTPS. You can undo this\nchange by editing your web server's configuration.\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nSelect the appropriate number [1-2] then [enter] (press 'c' to cancel): <strong>2<\/strong>\nRedirecting all traffic on port 80 to ssl in \/etc\/nginx\/conf.d\/example.conf\nRedirecting all traffic on port 80 to ssl in \/etc\/nginx\/conf.d\/example.conf\n<\/pre>\n\n\n\n<p>If everything is set up as should be the certificate will be installed and you will receive the message below.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Congratulations! You have successfully enabled https:\/\/yourdomain.com and\nhttps:\/\/www.yourdomain.com\n\nYou should test your configuration at:\nhttps:\/\/www.ssllabs.com\/ssltest\/analyze.html?d=yourdomain.com\nhttps:\/\/www.ssllabs.com\/ssltest\/analyze.html?d=www.yourdomain.com\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n\nIMPORTANT NOTES:\n - Congratulations! Your certificate and chain have been saved at:\n   \/etc\/letsencrypt\/live\/<strong>yourdomain.com<\/strong>\/fullchain.pem\n   Your key file has been saved at:\n   \/etc\/letsencrypt\/live\/<strong>yourdomain.com<\/strong>\/privkey.pem\n   Your cert will expire on 2022-05-07. To obtain a new or tweaked\n   version of this certificate in the future, simply run certbot again\n   with the \"certonly\" option. To non-interactively renew *all* of\n   your certificates, run \"certbot renew\"\n - Your account credentials have been saved in your Certbot\n   configuration directory at \/etc\/letsencrypt. You should make a\n   secure backup of this folder now. This configuration directory will\n   also contain certificates and private keys obtained by Certbot so\n   making regular backups of this folder is ideal.\n - If you like Certbot, please consider supporting our work by:\n\n   Donating to ISRG \/ Let's Encrypt:   https:\/\/letsencrypt.org\/donate\n   Donating to EFF:                    https:\/\/eff.org\/donate-le\n<\/pre>\n\n\n\n<p>Now, you can access your website securely at <strong>https:\/\/yourdomain.com<\/strong><\/p>\n\n\n\n<p>Congratulations! You successfully secured the Nginx with Free Let&#8217;s Encrypt SSL certificate on your Ubuntu 20.04 server.<\/p>\n\n\n\n<p>Of course, you don\u2019t have to install the SSL certificate on your own, and if you use one of our SSD <a href=\"https:\/\/www.rosehosting.com\/linux-vps-hosting\/\">VPS Hosting services<\/a>, in which case you can simply ask our expert system administrators to install it for you and secure your website. They are available 24\u00d77 and will take care of your request immediately.<\/p>\n\n\n\n<p>If you liked this post, on how to secure Nginx with Lets Encrypt on Ubuntu 20.04, please share it with your friends on the social networks using the buttons below or simply leave a comment in the comments section. Thanks.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Securing a website running with Nginx as a web server can be done with Let&#8217;s Encrypt, and that is why &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"How To Secure Nginx with Let&#8217;s Encrypt on Ubuntu 20.04\" class=\"read-more button\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20-04\/#more-40354\" aria-label=\"Read more about How To Secure Nginx with Let&#8217;s Encrypt on Ubuntu 20.04\">Read More<\/a><\/p>\n","protected":false},"author":4,"featured_media":40534,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13,1698],"tags":[1632,49,1839],"class_list":["post-40354","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","category-ubuntu","tag-lets-encrypt","tag-nginx","tag-ubuntu-20-04","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-33"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How To Secure Nginx with Let&#039;s Encrypt on Ubuntu 20.04 | RoseHosting<\/title>\n<meta name=\"description\" content=\"Installing Free Let&#039;s Encrypt SSL certificate on Ubuntu 20.04 with Certbot is a straightforward process. Let&#039;s get started!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20-04\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How To Secure Nginx with Let&#039;s Encrypt on Ubuntu 20.04\" \/>\n<meta property=\"og:description\" content=\"Installing Free Let&#039;s Encrypt SSL certificate on Ubuntu 20.04 with Certbot is a straightforward process. Let&#039;s get started!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.rosehosting.com\/blog\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20-04\/\" \/>\n<meta property=\"og:site_name\" content=\"RoseHosting\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/RoseHosting\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/rosehosting.helpdesk\" \/>\n<meta property=\"article:published_time\" content=\"2022-03-23T17:30:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-06-03T08:31:23+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/02\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20.04.jpg?v=1645610838\" \/>\n\t<meta property=\"og:image:width\" content=\"742\" \/>\n\t<meta property=\"og:image:height\" content=\"372\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Jeff Wilson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:description\" content=\"Installing Free Let&#039;s Encrypt SSL certificate on Ubuntu 20.04 with Certbot is a straightforward process. Let&#039;s get started!\" \/>\n<meta name=\"twitter:creator\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:site\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeff Wilson\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20-04\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20-04\\\/\"},\"author\":{\"name\":\"Jeff Wilson\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/person\\\/7ce77a842fa6a9a7f8efa186f2353713\"},\"headline\":\"How To Secure Nginx with Let&#8217;s Encrypt on Ubuntu 20.04\",\"datePublished\":\"2022-03-23T17:30:00+00:00\",\"dateModified\":\"2022-06-03T08:31:23+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20-04\\\/\"},\"wordCount\":562,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20-04\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20.04.jpg\",\"keywords\":[\"Let's Encrypt\",\"nginx\",\"Ubuntu 20.04\"],\"articleSection\":[\"Tutorials\",\"Ubuntu\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20-04\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20-04\\\/\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20-04\\\/\",\"name\":\"How To Secure Nginx with Let's Encrypt on Ubuntu 20.04 | RoseHosting\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20-04\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20-04\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20.04.jpg\",\"datePublished\":\"2022-03-23T17:30:00+00:00\",\"dateModified\":\"2022-06-03T08:31:23+00:00\",\"description\":\"Installing Free Let's Encrypt SSL certificate on Ubuntu 20.04 with Certbot is a straightforward process. Let's get started!\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20-04\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20-04\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20-04\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20.04.jpg\",\"contentUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20.04.jpg\",\"width\":742,\"height\":372,\"caption\":\"how to secure nginx with let's encrypt on ubuntu 20.04\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20-04\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How To Secure Nginx with Let&#8217;s Encrypt on Ubuntu 20.04\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\",\"name\":\"RoseHosting.com\",\"description\":\"Premium Linux Tutorials Since 2001\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\",\"name\":\"RoseHosting\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/android-chrome-192x192-1.png\",\"contentUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/android-chrome-192x192-1.png\",\"width\":192,\"height\":192,\"caption\":\"RoseHosting\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/RoseHosting\",\"https:\\\/\\\/x.com\\\/rosehosting\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/rosehosting\\\/\"],\"description\":\"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.\",\"email\":\"info@rosehosting.com\",\"telephone\":\"(314) 275-0414\",\"legalName\":\"Rose Web Services LLC\",\"foundingDate\":\"2001-04-02\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"11\",\"maxValue\":\"50\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/person\\\/7ce77a842fa6a9a7f8efa186f2353713\",\"name\":\"Jeff Wilson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"caption\":\"Jeff Wilson\"},\"description\":\"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.\",\"sameAs\":[\"https:\\\/\\\/www.rosehosting.com\",\"https:\\\/\\\/www.facebook.com\\\/rosehosting.helpdesk\"],\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/author\\\/jwilson\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How To Secure Nginx with Let's Encrypt on Ubuntu 20.04 | RoseHosting","description":"Installing Free Let's Encrypt SSL certificate on Ubuntu 20.04 with Certbot is a straightforward process. Let's get started!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.rosehosting.com\/blog\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20-04\/","og_locale":"en_US","og_type":"article","og_title":"How To Secure Nginx with Let's Encrypt on Ubuntu 20.04","og_description":"Installing Free Let's Encrypt SSL certificate on Ubuntu 20.04 with Certbot is a straightforward process. Let's get started!","og_url":"https:\/\/www.rosehosting.com\/blog\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20-04\/","og_site_name":"RoseHosting","article_publisher":"https:\/\/www.facebook.com\/RoseHosting","article_author":"https:\/\/www.facebook.com\/rosehosting.helpdesk","article_published_time":"2022-03-23T17:30:00+00:00","article_modified_time":"2022-06-03T08:31:23+00:00","og_image":[{"width":742,"height":372,"url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/02\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20.04.jpg?v=1645610838","type":"image\/jpeg"}],"author":"Jeff Wilson","twitter_card":"summary_large_image","twitter_description":"Installing Free Let's Encrypt SSL certificate on Ubuntu 20.04 with Certbot is a straightforward process. Let's get started!","twitter_creator":"@rosehosting","twitter_site":"@rosehosting","twitter_misc":{"Written by":"Jeff Wilson","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20-04\/#article","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20-04\/"},"author":{"name":"Jeff Wilson","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713"},"headline":"How To Secure Nginx with Let&#8217;s Encrypt on Ubuntu 20.04","datePublished":"2022-03-23T17:30:00+00:00","dateModified":"2022-06-03T08:31:23+00:00","mainEntityOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20-04\/"},"wordCount":562,"commentCount":0,"publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20-04\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/02\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20.04.jpg","keywords":["Let's Encrypt","nginx","Ubuntu 20.04"],"articleSection":["Tutorials","Ubuntu"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.rosehosting.com\/blog\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20-04\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20-04\/","url":"https:\/\/www.rosehosting.com\/blog\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20-04\/","name":"How To Secure Nginx with Let's Encrypt on Ubuntu 20.04 | RoseHosting","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20-04\/#primaryimage"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20-04\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/02\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20.04.jpg","datePublished":"2022-03-23T17:30:00+00:00","dateModified":"2022-06-03T08:31:23+00:00","description":"Installing Free Let's Encrypt SSL certificate on Ubuntu 20.04 with Certbot is a straightforward process. Let's get started!","breadcrumb":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20-04\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.rosehosting.com\/blog\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20-04\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20-04\/#primaryimage","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/02\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20.04.jpg","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/02\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20.04.jpg","width":742,"height":372,"caption":"how to secure nginx with let's encrypt on ubuntu 20.04"},{"@type":"BreadcrumbList","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20-04\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.rosehosting.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How To Secure Nginx with Let&#8217;s Encrypt on Ubuntu 20.04"}]},{"@type":"WebSite","@id":"https:\/\/www.rosehosting.com\/blog\/#website","url":"https:\/\/www.rosehosting.com\/blog\/","name":"RoseHosting.com","description":"Premium Linux Tutorials Since 2001","publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.rosehosting.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.rosehosting.com\/blog\/#organization","name":"RoseHosting","url":"https:\/\/www.rosehosting.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","width":192,"height":192,"caption":"RoseHosting"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/RoseHosting","https:\/\/x.com\/rosehosting","https:\/\/www.linkedin.com\/in\/rosehosting\/"],"description":"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.","email":"info@rosehosting.com","telephone":"(314) 275-0414","legalName":"Rose Web Services LLC","foundingDate":"2001-04-02","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"11","maxValue":"50"}},{"@type":"Person","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713","name":"Jeff Wilson","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","caption":"Jeff Wilson"},"description":"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.","sameAs":["https:\/\/www.rosehosting.com","https:\/\/www.facebook.com\/rosehosting.helpdesk"],"url":"https:\/\/www.rosehosting.com\/blog\/author\/jwilson\/"}]}},"_links":{"self":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/40354","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/comments?post=40354"}],"version-history":[{"count":5,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/40354\/revisions"}],"predecessor-version":[{"id":40570,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/40354\/revisions\/40570"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media\/40534"}],"wp:attachment":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media?parent=40354"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/categories?post=40354"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/tags?post=40354"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}