{"id":15073,"date":"2023-09-21T09:32:42","date_gmt":"2023-09-21T08:32:42","guid":{"rendered":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/?p=15073"},"modified":"2023-09-21T09:32:43","modified_gmt":"2023-09-21T08:32:43","slug":"how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20-04","status":"publish","type":"post","link":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/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":"\n<p>Let\u2019s Encrypt is a (Certificate Authority) providing SSL\/TLS certificates. These certificates provide a secure encryption between the data and the browser.&nbsp; Certbot is a software client that automates the tasks of obtaining certificates and configuring web servers to use them. Currently, the process is fully automated on Apache and Nginx web servers.<\/p>\n\n\n\n<p>In this guide, we explain the process of securing an <a href=\"https:\/\/www.milesweb.co.uk\/web-security\/ssl-certificates\" target=\"_blank\" rel=\"noreferrer noopener\">SSL certificate<\/a> for your Nginx on Ubuntu 20.04 by installing Certbot.<\/p>\n\n\n\n<p>Before that there are prerequisites to consider for a hassle-free configuration.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>Ubuntu 20.04 server. It must include sudo-enabled non-root users and a firewall.<\/li><li>Registered domain name. If not done yet, MilesWeb provides the relevant domains like .com, .net, .in and many more.<\/li><li>Set up both the DNS records for your server.<\/li><li>There should be an DNS \u201cA\u201d record with the site example.com pointing to your server&#8217;s public IP address.<\/li><li>A record pointing to the public IP address of your server with www.example.com.<\/li><li>Get Nginx installed and a server block for your domain.<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Steps to Secure Nginx with Let&#8217;s Encrypt on Ubuntu 20.04<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1.\u00a0Installing Certbot<\/h3>\n\n\n\n<p>Obtaining an SSL certificate with Let&#8217;s Encrypt requires installing the Certbot software on the server.<\/p>\n\n\n\n<p>With the Nginx plugin for Certbot, users can install it as follows:<\/p>\n\n\n\n<code>sudo apt install certbot python3-certbot-nginx<\/code>\n\n\n\n<p>Certbot is now ready for use, but we need to verify some Nginx configurations before it automatically configures SSL for Nginx.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2.\u00a0Confirming Nginx\u2019s Configuration<\/h3>\n\n\n\n<p>For Certbot to be able to automatically configure SSL, it needs to be able to locate the correct server block in Nginx configuration. This works by searching for a &#8216;server_name&#8217; directive that corresponds to the domain for which you are requesting a certificate.<\/p>\n\n\n\n<p>You should already have a server block for&nbsp; the domain at \/etc\/nginx\/sites-available\/example.com with the server_name directive set appropriately if followed the Nginx installation tutorial.<\/p>\n\n\n\n<p>In nano or any text editor, open the configuration file for&nbsp; the domain:<\/p>\n\n\n\n<code>sudo nano \/etc\/nginx\/sites-available\/example.com<\/code>\n\n\n\n<p>Check to see if there is a server_name line already present. The format should be as follows:<\/p>\n\n\n\n<code>server_name example.com www.example.com; ...<\/code>\n\n\n\n<p>Continue to the next step if it does.<\/p>\n\n\n\n<p>Update it if it doesn&#8217;t. Verify the syntax of its configuration edits after saving the file, quitting the editor:<\/p>\n\n\n\n<code>sudo nginx \u2013t<\/code>\n\n\n\n<p>If users experience any error, reopen the server block file to evaluate any typos. Remove errors and keep the right syntax. Then, reload Nginx to deploy the new configuration through the following command.<\/p>\n\n\n\n<code>sudo systemctl reload nginx<\/code>\n\n\n\n<p>Certbot easily find and update the correct server block<\/p>\n\n\n\n<p>Next, allow HTTPS traffic to update the firewall settings.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">3.\u00a0Allowing HTTPS Through the Firewall<\/h3>\n\n\n\n<p>Next, users&nbsp; will have to adjust settings to allow HTTPS traffic. Before that, ensure the ufw firewall is enabled. It is recommended as the major prerequisite for a hassle-free installation process. When Nginx is installed, it automatically registers a few profiles with ufw.<\/p>\n\n\n\n<p>Check out the current setting by entering the following command in the terminal.<\/p>\n\n\n\n<code>sudo ufw status<\/code>\n\n\n\n<p>Here are the output users get while allowing HTTP traffic to the web server.<\/p>\n\n\n\n<p>Output<\/p>\n\n\n\n<p>Status: active<\/p>\n\n\n\n<p>To&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Action&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; From<\/p>\n\n\n\n<p>&#8212;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8212;&#8212;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8212;-<\/p>\n\n\n\n<p>OpenSSH&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ALLOW&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Anywhere&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/p>\n\n\n\n<p>Nginx HTTP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ALLOW&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Anywhere&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/p>\n\n\n\n<p>OpenSSH (v6)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ALLOW&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Anywhere (v6)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/p>\n\n\n\n<p>Nginx HTTP (v6)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ALLOW&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Anywhere (v6)<\/p>\n\n\n\n<p>In order to allow HTTPS traffic, allow the Nginx Full profile and delete the redundant Nginx HTTP profile:<\/p>\n\n\n\n<code>sudo ufw allow 'Nginx Full'<\/code>\n\n\n\n<code>sudo ufw delete allow 'Nginx HTTP'<\/code>\n\n\n\n<p>Enter this command to get final status.<\/p>\n\n\n\n<p>sudo ufw status<\/p>\n\n\n\n<p>The final output.<\/p>\n\n\n\n<p>Status: active<\/p>\n\n\n\n<p>To&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Action&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; From<\/p>\n\n\n\n<p>&#8212;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8212;&#8212;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8212;-<\/p>\n\n\n\n<p>OpenSSH&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ALLOW&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Anywhere<\/p>\n\n\n\n<p>Nginx Full&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ALLOW&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Anywhere<\/p>\n\n\n\n<p>OpenSSH (v6)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ALLOW&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Anywhere (v6)<\/p>\n\n\n\n<p>Nginx Full (v6)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ALLOW&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Anywhere (v6)<\/p>\n\n\n\n<p>Next, fetch SSL certificates by running Certbot.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">4.\u00a0Get an SSL Certificate<\/h3>\n\n\n\n<p>Certbot has several plugins from which users can obtain SSL certificates. Nginx plugin helps in reconfiguring Nginx and reloading the config when required. Enter the following command to enable the plugin.<\/p>\n\n\n\n<code>sudo certbot --nginx -d example.com -d www.example.com<\/code>\n\n\n\n<p>By using -d, we specify the domain names for which the certificate should be valid when we run certbot with the &#8211;nginx plugin.<\/p>\n\n\n\n<p>Your first time using certbot will require you to enter your email address and agree to the terms of service. Certbot will then communicate with the Let&#8217;s Encrypt server, and run a challenge to verify that you control the domain you&#8217;re requesting a certificate for.<\/p>\n\n\n\n<p>You&#8217;ll be prompted to configure your HTTPS settings if that&#8217;s successful.<\/p>\n\n\n\n<p><strong>Output<\/strong><\/p>\n\n\n\n<p>Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access.<\/p>\n\n\n\n<p>&#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211;<\/p>\n\n\n\n<p>1: No redirect &#8211; Make no further changes to the webserver configuration.<\/p>\n\n\n\n<p>2: Redirect &#8211; Make all requests redirect to secure HTTPS access. Choose this for<\/p>\n\n\n\n<p>new sites, or if you&#8217;re confident your site works on HTTPS. You can undo this<\/p>\n\n\n\n<p>change by editing your web server&#8217;s configuration.<\/p>\n\n\n\n<p>&#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211;<\/p>\n\n\n\n<p>Select the appropriate number [1-2] then [enter] (press &#8216;c&#8217; to cancel):<\/p>\n\n\n\n<p>Hit ENTER after selecting your choice. Latest configurations will get updated and Nginx will reload with new settings.<\/p>\n\n\n\n<p>Select your choice then hit ENTER. The configuration will be updated, and Nginx will reload to pick up the new settings. Then, Certbot gives a closure message showing the installation process successful.<\/p>\n\n\n\n<p><strong>Output<\/strong><\/p>\n\n\n\n<p><strong>IMPORTANT NOTES:<\/strong><\/p>\n\n\n\n<p>&nbsp;&#8211; Congratulations! Your certificate and chain have been saved at:<\/p>\n\n\n\n<code>&nbsp;&nbsp; \/etc\/letsencrypt\/live\/example.com\/fullchain.pem<\/code>\n\n\n\n<p>&nbsp;&nbsp; Your key file has been saved at:<\/p>\n\n\n\n<code>&nbsp;&nbsp; \/etc\/letsencrypt\/live\/example.com\/privkey.pem<\/code>\n\n\n\n<p>&nbsp;&nbsp; Your cert will expire on 2020-08-18. To obtain a new or tweaked<\/p>\n\n\n\n<p>&nbsp;&nbsp; version of this certificate in the future, simply run certbot again<\/p>\n\n\n\n<p>&nbsp;&nbsp; with the &#8220;certonly&#8221; option. To non-interactively renew *all* of<\/p>\n\n\n\n<p>&nbsp;&nbsp; your certificates, run &#8220;certbot renew&#8221;<\/p>\n\n\n\n<p>&nbsp;&#8211; If you like Certbot, please consider supporting our work by:<\/p>\n\n\n\n<p>&nbsp;&nbsp; Donating to ISRG \/ Let&#8217;s Encrypt:&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; https:\/\/letsencrypt.org\/donate<\/p>\n\n\n\n<p>\u00a0\u00a0 Donating to EFF:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0https:\/\/eff.org\/donate-le<\/p>\n\n\n\n<p>Great, your certificates are downloaded and loaded. Reload the website using https:\/\/ and check the browser&#8217;s security indicator. Ensure websites have the lock icon. But your job is not done yet. Let\u2019s Encrypt certificates are valid till 90 days only. Hence, completing the renewal process is mandatory.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">5.\u00a0Auto Renewal of Certificates<\/h3>\n\n\n\n<p><a><\/a>Certbot encourages users to automate their certificate renewal process. Use certbot to do a dry run of the renewal process.<\/p>\n\n\n\n<code>sudo certbot renew --dry-run<\/code>\n\n\n\n<p>All you need to do is check for errors. Whenever necessary, Certbot will renew your certificates and reload Nginx. Let&#8217;s Encrypt will send you an email warning users when their certificate expires if the automated renewal process ever fails.<\/p>\n\n\n\n<p><div class=\"vlt-box \">\n<div class=\"box-title\" style=\"background:#D5EAFF; color:#000\">Key Takeaways<\/div>\n<div class=\"box-content\" >\n<p>In this guide, readers successfully learnt to set up the Let&#8217;s Encrypt certbot client, acquiring SSL certificates for their domain, adjusted Nginx settings to utilize these certificates, and arranged for automatic certificate renewals. For further information, kindly connect with our technical engineers.<\/p>\n<\/div><\/div><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Let\u2019s Encrypt is a (Certificate Authority) providing SSL\/TLS certificates. These certificates provide a secure encryption between the data and the browser.&nbsp; Certbot is a software client that automates the tasks of obtaining certificates and configuring web servers to use them. Currently, the process is fully automated on Apache and Nginx web servers. In this guide, [&hellip;]<\/p>\n","protected":false},"author":35,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[41],"tags":[848,621],"class_list":["post-15073","post","type-post","status-publish","format-standard","placeholder-for-hentry","category-howtos","tag-nginx","tag-ubuntu"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Secure Nginx with Let&#039;s Encrypt on Ubuntu 20.04?<\/title>\n<meta name=\"description\" content=\"Safeguarding Nginx nameserver with this guide and easy steps. Secure CentOS7 compliant servers with SSL certificates.\" \/>\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.milesweb.co.uk\/hosting-faqs\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20-04\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\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=\"Safeguarding Nginx nameserver with this guide and easy steps. Secure CentOS7 compliant servers with SSL certificates.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20-04\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Hosting FAQs by MilesWeb\" \/>\n<meta property=\"article:published_time\" content=\"2023-09-21T08:32:42+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-09-21T08:32:43+00:00\" \/>\n<meta name=\"author\" content=\"Jackson Lane\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jackson Lane\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20-04\/\",\"url\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20-04\/\",\"name\":\"How to Secure Nginx with Let's Encrypt on Ubuntu 20.04?\",\"isPartOf\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website\"},\"datePublished\":\"2023-09-21T08:32:42+00:00\",\"dateModified\":\"2023-09-21T08:32:43+00:00\",\"author\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/1f580bdff0fa81720fae0fd0c3919758\"},\"description\":\"Safeguarding Nginx nameserver with this guide and easy steps. Secure CentOS7 compliant servers with SSL certificates.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20-04\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20-04\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20-04\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Secure Nginx with Let&#8217;s Encrypt on Ubuntu 20.04?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website\",\"url\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/\",\"name\":\"Web Hosting FAQs by MilesWeb\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/1f580bdff0fa81720fae0fd0c3919758\",\"name\":\"Jackson Lane\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/dd43b6ec8f85bdee32ceaac59c48807f?s=96&d=blank&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/dd43b6ec8f85bdee32ceaac59c48807f?s=96&d=blank&r=g\",\"caption\":\"Jackson Lane\"},\"description\":\"I am an experienced Marketing Manager at MilesWeb UK, a leading web hosting company in the UK. With extensive knowledge in web hosting, WordPress, digital marketing, and web development, I'm committed to helping businesses succeed online. His expertise and enthusiasm for the digital world make him a valuable asset in the constantly changing field of online marketing.\",\"url\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/author\/jackson-lane\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Secure Nginx with Let's Encrypt on Ubuntu 20.04?","description":"Safeguarding Nginx nameserver with this guide and easy steps. Secure CentOS7 compliant servers with SSL certificates.","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.milesweb.co.uk\/hosting-faqs\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20-04\/","og_locale":"en_GB","og_type":"article","og_title":"How to Secure Nginx with Let's Encrypt on Ubuntu 20.04?","og_description":"Safeguarding Nginx nameserver with this guide and easy steps. Secure CentOS7 compliant servers with SSL certificates.","og_url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20-04\/","og_site_name":"Web Hosting FAQs by MilesWeb","article_published_time":"2023-09-21T08:32:42+00:00","article_modified_time":"2023-09-21T08:32:43+00:00","author":"Jackson Lane","twitter_misc":{"Written by":"Jackson Lane","Estimated reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20-04\/","url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20-04\/","name":"How to Secure Nginx with Let's Encrypt on Ubuntu 20.04?","isPartOf":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website"},"datePublished":"2023-09-21T08:32:42+00:00","dateModified":"2023-09-21T08:32:43+00:00","author":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/1f580bdff0fa81720fae0fd0c3919758"},"description":"Safeguarding Nginx nameserver with this guide and easy steps. Secure CentOS7 compliant servers with SSL certificates.","breadcrumb":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20-04\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20-04\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-secure-nginx-with-lets-encrypt-on-ubuntu-20-04\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/"},{"@type":"ListItem","position":2,"name":"How to Secure Nginx with Let&#8217;s Encrypt on Ubuntu 20.04?"}]},{"@type":"WebSite","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website","url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/","name":"Web Hosting FAQs by MilesWeb","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Person","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/1f580bdff0fa81720fae0fd0c3919758","name":"Jackson Lane","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/dd43b6ec8f85bdee32ceaac59c48807f?s=96&d=blank&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/dd43b6ec8f85bdee32ceaac59c48807f?s=96&d=blank&r=g","caption":"Jackson Lane"},"description":"I am an experienced Marketing Manager at MilesWeb UK, a leading web hosting company in the UK. With extensive knowledge in web hosting, WordPress, digital marketing, and web development, I'm committed to helping businesses succeed online. His expertise and enthusiasm for the digital world make him a valuable asset in the constantly changing field of online marketing.","url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/author\/jackson-lane\/"}]}},"views":0,"_links":{"self":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts\/15073","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/users\/35"}],"replies":[{"embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/comments?post=15073"}],"version-history":[{"count":3,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts\/15073\/revisions"}],"predecessor-version":[{"id":15076,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts\/15073\/revisions\/15076"}],"wp:attachment":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/media?parent=15073"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/categories?post=15073"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/tags?post=15073"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}