{"id":5839,"date":"2022-10-17T14:55:04","date_gmt":"2022-10-17T08:55:04","guid":{"rendered":"https:\/\/10.100.1.199\/?p=5839"},"modified":"2024-04-05T15:46:43","modified_gmt":"2024-04-05T09:46:43","slug":"how-to-install-ssl-certificate-on-nginx-site","status":"publish","type":"post","link":"https:\/\/saq-digital.com\/kk\/how-to-install-ssl-certificate-on-nginx-site\/","title":{"rendered":"Nginx \u0436\u04af\u0439\u0435\u0441\u0456\u043d\u0434\u0435 ERPNext \u0441\u0430\u0439\u0442\u044b\u043d\u0430 SSL \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u044b\u043d \u043e\u0440\u043d\u0430\u0442\u0443"},"content":{"rendered":"<p>An SSL certificate is a digital certificate that authenticates a website&#8217;s identity and enables an encrypted connection. SSL stands for Secure Sockets Layer, a security protocol that creates an encrypted link between a web server and a web browser or end users.<\/p>\n\n\n\n<p>Website owners need to add SSL certificates to their websites to secure online transactions and keep users information private and secure. SSL keeps internet connections secure and prevents Man-in-the-middle&nbsp;from reading or modifying information transferred between two systems.<\/p>\n\n\n\n<p>Here we will install ssl certificate on nginx web site on Linux Ubuntu.<\/p>\n\n\n\n<p>Go to the server that installed nginx and use OpenSSL to run below command to generating an RSA private key<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-palette-color-4-background-color has-text-color has-background\"><code>user@nginx:~$ openssl req -new -newkey rsa:2048 -nodes -keyout example.com.key -out example.com.csr\nGenerating a RSA private key\n...........................................................................................................................................................+++++\n...........+++++\nwriting new private key to 'example.com'\n-----\nYou are about to be asked to enter information that will be incorporated\ninto your certificate request.\nWhat you are about to enter is what is called a Distinguished Name or a DN.\nThere are quite a few fields but you can leave some blank\nFor some fields there will be a default value,\nIf you enter '.', the field will be left blank.\n-----\nCountry Name (2 letter code) &#91;AU]:KZ\nState or Province Name (full name) &#91;Some-State]:Aqmola\nLocality Name (eg, city) &#91;]:Astana\nOrganization Name (eg, company) &#91;Internet Widgits Pty Ltd]: Your company\nOrganizational Unit Name (eg, section) &#91;]:IT\nCommon Name (e.g. server FQDN or YOUR name) &#91;]:example.com\nEmail Address &#91;]:admin@example.com\n\nPlease enter the following 'extra' attributes\nto be sent with your certificate request\nA challenge password &#91;]:\nAn optional company name &#91;]:<\/code><\/pre>\n\n\n\n<p>We will get 2 files:  example.com.key and example.com.csr<\/p>\n\n\n\n<p>example.com.key is our private key, and we need move it to \/etc\/nginx\/conf.d\/ssl\/ in order to install ssl certificate later on.<\/p>\n\n\n\n<p>We use example.com.csr to generate ssl certificate from the certificate provider.<\/p>\n\n\n\n<p>Go to the certificate provider and it will ask us to provide the csr in order to create ssl certificate.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img fetchpriority=\"high\" decoding=\"async\" width=\"945\" height=\"512\" src=\"\/wp-content\/uploads\/2022\/10\/generate-ssl-add-csr.jpg\" alt=\"\" class=\"wp-image-5844\" srcset=\"https:\/\/saq-digital.com\/wp-content\/uploads\/2022\/10\/generate-ssl-add-csr.jpg 945w, https:\/\/saq-digital.com\/wp-content\/uploads\/2022\/10\/generate-ssl-add-csr-300x163.jpg 300w, https:\/\/saq-digital.com\/wp-content\/uploads\/2022\/10\/generate-ssl-add-csr-768x416.jpg 768w\" sizes=\"(max-width: 945px) 100vw, 945px\" \/><\/figure>\n\n\n\n<p>As soon as we add csr file to generate ssl certificate we will get PEM Chain, PEM, DER or PKCS-7 format certificate files, and it depends on your ssl provider. here we use PEM Chain file on our nginx server.<\/p>\n\n\n\n<p>Upload pem-chain file into nginx server and put on \/etc\/nginx\/conf.d\/ssl\/<\/p>\n\n\n\n<p>Then run below command to install ssl certificate on our ERPNext site:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-palette-color-4-background-color has-text-color has-background\"><code>user@nginx:~\/frappe-bench$ bench set-ssl-certificate example.com \/etc\/nginx\/conf.d\/ssl\/example.com.pem-chain\nnginx.conf already exists and this will overwrite it. Do you want to continue? &#91;y\/N]: y\nuser@nginx:~\/frappe-bench$ bench set-ssl-key example.com \/etc\/nginx\/conf.d\/ssl\/example.com.key\n\/\/example.com.key is the one we have generated at first step.\nnginx.conf already exists and this will overwrite it. Do you want to continue? &#91;y\/N]: y\nuser@nginx:~\/frappe-bench$ bench setup nginx\nnginx.conf already exists and this will overwrite it. Do you want to continue? &#91;y\/N]: y\nuser@nginx:~\/frappe-bench$ sudo service nginx reload<\/code><\/pre>","protected":false},"excerpt":{"rendered":"<p>An SSL certificate is a digital certificate that authenticates a website&#8217;s identity and enables an encrypted connection. SSL stands for Secure Sockets Layer, a security protocol that creates an encrypted link between a web server and a web browser or end users. Website owners need to add SSL certificates to their websites to secure online [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":5842,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[103,127],"tags":[115,126],"class_list":["post-5839","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cybersecurity","category-erpnext","tag-servers","tag-ssl-certificate"],"blocksy_meta":{"styles_descriptor":{"styles":{"desktop":"","tablet":"","mobile":""},"google_fonts":[],"version":6}},"aioseo_notices":[],"featured_image_urls_v2":{"full":["https:\/\/saq-digital.com\/wp-content\/uploads\/2022\/10\/cyber_security_0.jpg",1000,445,false],"thumbnail":["https:\/\/saq-digital.com\/wp-content\/uploads\/2022\/10\/cyber_security_0-150x150.jpg",150,150,true],"medium":["https:\/\/saq-digital.com\/wp-content\/uploads\/2022\/10\/cyber_security_0-300x134.jpg",300,134,true],"medium_large":["https:\/\/saq-digital.com\/wp-content\/uploads\/2022\/10\/cyber_security_0-768x342.jpg",768,342,true],"large":["https:\/\/saq-digital.com\/wp-content\/uploads\/2022\/10\/cyber_security_0.jpg",1000,445,false],"1536x1536":["https:\/\/saq-digital.com\/wp-content\/uploads\/2022\/10\/cyber_security_0.jpg",1000,445,false],"2048x2048":["https:\/\/saq-digital.com\/wp-content\/uploads\/2022\/10\/cyber_security_0.jpg",1000,445,false],"trp-custom-language-flag":["https:\/\/saq-digital.com\/wp-content\/uploads\/2022\/10\/cyber_security_0.jpg",18,8,false]},"post_excerpt_stackable_v2":"<p>An SSL certificate is a digital certificate that authenticates a website&#8217;s identity and enables an encrypted connection. SSL stands for Secure Sockets Layer, a security protocol that creates an encrypted link between a web server and a web browser or end users. Website owners need to add SSL certificates to their websites to secure online transactions and keep users information private and secure. SSL keeps internet connections secure and prevents Man-in-the-middle&nbsp;from reading or modifying information transferred between two systems. Here we will install ssl certificate on nginx web site on Linux Ubuntu. Go to the server that installed nginx and&hellip;<\/p>\n","category_list_v2":"<a href=\"https:\/\/saq-digital.com\/kk\/category\/cybersecurity\/\" rel=\"category tag\">CyberSecurity<\/a>, <a href=\"https:\/\/saq-digital.com\/kk\/category\/digital-solutions\/erpnext\/\" rel=\"category tag\">ERPNext<\/a>","author_info_v2":{"name":"SAQ","url":"https:\/\/saq-digital.com\/kk\/author\/serik-akim\/"},"comments_num_v2":"0 comments","brizy_media":[],"_links":{"self":[{"href":"https:\/\/saq-digital.com\/kk\/wp-json\/wp\/v2\/posts\/5839","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/saq-digital.com\/kk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/saq-digital.com\/kk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/saq-digital.com\/kk\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/saq-digital.com\/kk\/wp-json\/wp\/v2\/comments?post=5839"}],"version-history":[{"count":5,"href":"https:\/\/saq-digital.com\/kk\/wp-json\/wp\/v2\/posts\/5839\/revisions"}],"predecessor-version":[{"id":7109,"href":"https:\/\/saq-digital.com\/kk\/wp-json\/wp\/v2\/posts\/5839\/revisions\/7109"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/saq-digital.com\/kk\/wp-json\/wp\/v2\/media\/5842"}],"wp:attachment":[{"href":"https:\/\/saq-digital.com\/kk\/wp-json\/wp\/v2\/media?parent=5839"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/saq-digital.com\/kk\/wp-json\/wp\/v2\/categories?post=5839"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/saq-digital.com\/kk\/wp-json\/wp\/v2\/tags?post=5839"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}