{"id":31657,"date":"2024-11-01T09:01:23","date_gmt":"2024-11-01T09:01:23","guid":{"rendered":"http:\/\/atmokpo.com\/w\/?p=31657"},"modified":"2024-11-01T09:01:23","modified_gmt":"2024-11-01T09:01:23","slug":"adding-https-certificate-to-ubuntu-apache-server-free","status":"publish","type":"post","link":"https:\/\/atmokpo.com\/w\/31657\/","title":{"rendered":"Adding HTTPS Certificate to Ubuntu Apache Server &#8211; Free"},"content":{"rendered":"\n<p>To apply HTTPS to an Apache web server, it is necessary to install an SSL certificate and change the Apache settings. HTTPS is a protocol that enhances security between clients and servers by encrypting data. This process covers how to obtain an SSL certificate and apply it to the server.<\/p>\n\n\n\n<p>The following are the general steps to set up HTTPS:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1. <strong>Prepare SSL Certificate<\/strong><\/h3>\n\n\n\n<p>An SSL certificate is required to set up HTTPS. There are several methods to obtain a certificate, including the following:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Let&#8217;s Encrypt<\/strong>: Provides free SSL certificates.<\/li>\n\n\n\n<li><strong>Commercial SSL Certificate<\/strong>: Purchase paid certificates from providers such as Comodo, DigiCert, GlobalSign, etc.<\/li>\n<\/ul>\n\n\n\n<p>This description covers how to obtain an SSL certificate using the free option <strong>Let&#8217;s Encrypt<\/strong>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2. <strong>Install Certbot (When using Let&#8217;s Encrypt SSL)<\/strong><\/h3>\n\n\n\n<p>To obtain an SSL certificate from Let&#8217;s Encrypt, install <strong>Certbot<\/strong>. Certbot is a tool that automates the issuance and renewal of certificates.<\/p>\n\n\n\n<p><strong>Installing Certbot on Ubuntu\/Debian:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">bash code copy<code>sudo apt update\nsudo apt install certbot python3-certbot-apache\n<\/code><\/pre>\n\n\n\n<p><strong>Installing Certbot on CentOS\/RHEL:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">bash code copy<code>sudo yum install epel-release\nsudo yum install certbot python3-certbot-apache\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">3. <strong>Set Up HTTPS on Apache (Using Certbot)<\/strong><\/h3>\n\n\n\n<p>Using Certbot, you can automatically obtain an SSL certificate and modify the Apache settings.<\/p>\n\n\n\n<p><strong>Automate SSL Certificate Issuance and Apache Configuration with Certbot:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">bash code copy<code>sudo certbot --apache\n<\/code><\/pre>\n\n\n\n<p>When you run the above command, Certbot will automatically obtain the certificate and modify the Apache configuration file to enable HTTPS. During the process, you will be prompted to enter your domain name and decide whether to apply SSL.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">4. <strong>Manual Apache Configuration (When Manually Installing SSL Certificate)<\/strong><\/h3>\n\n\n\n<p>To manually install the SSL certificate, you need to modify the Apache configuration file.<\/p>\n\n\n\n<p><strong>1) Activate SSL Module:<\/strong><\/p>\n\n\n\n<p>On systems based on Ubuntu or Debian, you need to activate the <code>mod_ssl<\/code> module.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">bash code copy<code>sudo a2enmod ssl\n<\/code><\/pre>\n\n\n\n<p>On CentOS, you can install the <code>mod_ssl<\/code> package to activate the SSL module.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">bash code copy<code>sudo yum install mod_ssl\n<\/code><\/pre>\n\n\n\n<p><strong>2) Modify Virtual Host File:<\/strong><\/p>\n\n\n\n<p>Modify the Apache virtual host configuration file to apply HTTPS. Typically, you modify the configuration file located in the <code>\/etc\/apache2\/sites-available\/<\/code> directory.<\/p>\n\n\n\n<p>Example:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">bash code copy<code>sudo nano \/etc\/apache2\/sites-available\/your-domain.conf\n<\/code><\/pre>\n\n\n\n<p>In the <code>your-domain.conf<\/code> file, add the following HTTPS configuration:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">apache code copy<code>&lt;VirtualHost *:443&gt;\n    ServerName your-domain.com\n    DocumentRoot \/var\/www\/html\n\n    SSLEngine on\n    SSLCertificateFile \/etc\/letsencrypt\/live\/your-domain.com\/fullchain.pem\n    SSLCertificateKeyFile \/etc\/letsencrypt\/live\/your-domain.com\/privkey.pem\n    SSLCertificateChainFile \/etc\/letsencrypt\/live\/your-domain.com\/chain.pem\n\n    &lt;Directory \/var\/www\/html&gt;\n        Options Indexes FollowSymLinks\n        AllowOverride All\n        Require all granted\n    &lt;\/Directory&gt;\n&lt;\/VirtualHost&gt;\n<\/code><\/pre>\n\n\n\n<p>Reference the file paths for the certificates provided by Let\u2019s Encrypt. For commercial certificates, the paths must be changed to those of the issued certificates.<\/p>\n\n\n\n<p><strong>3) Verify Port 443 Settings:<\/strong><\/p>\n\n\n\n<p>Since SSL communication uses port 443, you need to ensure that Apache is listening on this port.<\/p>\n\n\n\n<p>Check the <code>\/etc\/apache2\/ports.conf<\/code> file for the following entry:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">apache code copy<code>Listen 443\n<\/code><\/pre>\n\n\n\n<p>On CentOS, similar settings can be applied by modifying the <code>\/etc\/httpd\/conf.d\/ssl.conf<\/code> file.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">5. <strong>Restart Apache<\/strong><\/h3>\n\n\n\n<p>Once the configuration is complete, restart Apache to apply the changes.<\/p>\n\n\n\n<p><strong>Ubuntu\/Debian:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">bash code copy<code>sudo systemctl restart apache2\n<\/code><\/pre>\n\n\n\n<p><strong>CentOS\/RHEL:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">bash code copy<code>sudo systemctl restart httpd\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">6. <strong>Automatic SSL Certificate Renewal (When Using Let&#8217;s Encrypt)<\/strong><\/h3>\n\n\n\n<p>Let&#8217;s Encrypt certificates are valid for 90 days, so it is necessary to configure automatic renewal. Certbot provides an automatic renewal script that can be registered in Crontab.<\/p>\n\n\n\n<p>Open Crontab:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">bash code copy<code>sudo crontab -e\n<\/code><\/pre>\n\n\n\n<p>You can add the following line to set it up to attempt Certbot renewal every day at dawn:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">bash code copy<code>0 3 * * * certbot renew --quiet\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Conclusion<\/h3>\n\n\n\n<p>This process allows you to apply HTTPS to Apache. Using Let\u2019s Encrypt, you can obtain an SSL certificate for free and handle automatic configuration and renewal easily through Certbot.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To apply HTTPS to an Apache web server, it is necessary to install an SSL certificate and change the Apache settings. HTTPS is a protocol that enhances security between clients and servers by encrypting data. This process covers how to obtain an SSL certificate and apply it to the server. The following are the general &hellip; <a href=\"https:\/\/atmokpo.com\/w\/31657\/\" class=\"more-link\">\ub354 \ubcf4\uae30<span class=\"screen-reader-text\"> &#8220;Adding HTTPS Certificate to Ubuntu Apache Server &#8211; Free&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4],"tags":[],"class_list":["post-31657","post","type-post","status-publish","format-standard","hentry","category-4"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Adding HTTPS Certificate to Ubuntu Apache Server - Free - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/atmokpo.com\/w\/31657\/\" \/>\n<meta property=\"og:locale\" content=\"ko_KR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Adding HTTPS Certificate to Ubuntu Apache Server - Free - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"og:description\" content=\"To apply HTTPS to an Apache web server, it is necessary to install an SSL certificate and change the Apache settings. HTTPS is a protocol that enhances security between clients and servers by encrypting data. This process covers how to obtain an SSL certificate and apply it to the server. The following are the general &hellip; \ub354 \ubcf4\uae30 &quot;Adding HTTPS Certificate to Ubuntu Apache Server &#8211; Free&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/atmokpo.com\/w\/31657\/\" \/>\n<meta property=\"og:site_name\" content=\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"article:published_time\" content=\"2024-11-01T09:01:23+00:00\" \/>\n<meta name=\"author\" content=\"root\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@bebubo4\" \/>\n<meta name=\"twitter:site\" content=\"@bebubo4\" \/>\n<meta name=\"twitter:label1\" content=\"\uae00\uc4f4\uc774\" \/>\n\t<meta name=\"twitter:data1\" content=\"root\" \/>\n\t<meta name=\"twitter:label2\" content=\"\uc608\uc0c1 \ub418\ub294 \ud310\ub3c5 \uc2dc\uac04\" \/>\n\t<meta name=\"twitter:data2\" content=\"3\ubd84\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/atmokpo.com\/w\/31657\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/31657\/\"},\"author\":{\"name\":\"root\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7\"},\"headline\":\"Adding HTTPS Certificate to Ubuntu Apache Server &#8211; Free\",\"datePublished\":\"2024-11-01T09:01:23+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/atmokpo.com\/w\/31657\/\"},\"wordCount\":490,\"publisher\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\"},\"articleSection\":[\"\uae30\uc220\uad00\ub828\"],\"inLanguage\":\"ko-KR\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/atmokpo.com\/w\/31657\/\",\"url\":\"https:\/\/atmokpo.com\/w\/31657\/\",\"name\":\"Adding HTTPS Certificate to Ubuntu Apache Server - Free - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#website\"},\"datePublished\":\"2024-11-01T09:01:23+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/atmokpo.com\/w\/31657\/#breadcrumb\"},\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/atmokpo.com\/w\/31657\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/atmokpo.com\/w\/31657\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\ud648\",\"item\":\"https:\/\/atmokpo.com\/w\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Adding HTTPS Certificate to Ubuntu Apache Server &#8211; Free\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/atmokpo.com\/w\/#website\",\"url\":\"https:\/\/atmokpo.com\/w\/\",\"name\":\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/atmokpo.com\/w\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ko-KR\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\",\"name\":\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"url\":\"https:\/\/atmokpo.com\/w\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png\",\"contentUrl\":\"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png\",\"width\":400,\"height\":400,\"caption\":\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\"},\"image\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/bebubo4\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7\",\"name\":\"root\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g\",\"caption\":\"root\"},\"sameAs\":[\"http:\/\/atmokpo.com\/w\"],\"url\":\"https:\/\/atmokpo.com\/w\/author\/root\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Adding HTTPS Certificate to Ubuntu Apache Server - Free - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","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:\/\/atmokpo.com\/w\/31657\/","og_locale":"ko_KR","og_type":"article","og_title":"Adding HTTPS Certificate to Ubuntu Apache Server - Free - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","og_description":"To apply HTTPS to an Apache web server, it is necessary to install an SSL certificate and change the Apache settings. HTTPS is a protocol that enhances security between clients and servers by encrypting data. This process covers how to obtain an SSL certificate and apply it to the server. The following are the general &hellip; \ub354 \ubcf4\uae30 \"Adding HTTPS Certificate to Ubuntu Apache Server &#8211; Free\"","og_url":"https:\/\/atmokpo.com\/w\/31657\/","og_site_name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","article_published_time":"2024-11-01T09:01:23+00:00","author":"root","twitter_card":"summary_large_image","twitter_creator":"@bebubo4","twitter_site":"@bebubo4","twitter_misc":{"\uae00\uc4f4\uc774":"root","\uc608\uc0c1 \ub418\ub294 \ud310\ub3c5 \uc2dc\uac04":"3\ubd84"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/atmokpo.com\/w\/31657\/#article","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/31657\/"},"author":{"name":"root","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7"},"headline":"Adding HTTPS Certificate to Ubuntu Apache Server &#8211; Free","datePublished":"2024-11-01T09:01:23+00:00","mainEntityOfPage":{"@id":"https:\/\/atmokpo.com\/w\/31657\/"},"wordCount":490,"publisher":{"@id":"https:\/\/atmokpo.com\/w\/#organization"},"articleSection":["\uae30\uc220\uad00\ub828"],"inLanguage":"ko-KR"},{"@type":"WebPage","@id":"https:\/\/atmokpo.com\/w\/31657\/","url":"https:\/\/atmokpo.com\/w\/31657\/","name":"Adding HTTPS Certificate to Ubuntu Apache Server - Free - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/#website"},"datePublished":"2024-11-01T09:01:23+00:00","breadcrumb":{"@id":"https:\/\/atmokpo.com\/w\/31657\/#breadcrumb"},"inLanguage":"ko-KR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/atmokpo.com\/w\/31657\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/atmokpo.com\/w\/31657\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\ud648","item":"https:\/\/atmokpo.com\/w\/en\/"},{"@type":"ListItem","position":2,"name":"Adding HTTPS Certificate to Ubuntu Apache Server &#8211; Free"}]},{"@type":"WebSite","@id":"https:\/\/atmokpo.com\/w\/#website","url":"https:\/\/atmokpo.com\/w\/","name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","description":"","publisher":{"@id":"https:\/\/atmokpo.com\/w\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/atmokpo.com\/w\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ko-KR"},{"@type":"Organization","@id":"https:\/\/atmokpo.com\/w\/#organization","name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","url":"https:\/\/atmokpo.com\/w\/","logo":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/","url":"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png","contentUrl":"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png","width":400,"height":400,"caption":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8"},"image":{"@id":"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/bebubo4"]},{"@type":"Person","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7","name":"root","image":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g","caption":"root"},"sameAs":["http:\/\/atmokpo.com\/w"],"url":"https:\/\/atmokpo.com\/w\/author\/root\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/31657","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/comments?post=31657"}],"version-history":[{"count":1,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/31657\/revisions"}],"predecessor-version":[{"id":31658,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/31657\/revisions\/31658"}],"wp:attachment":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/media?parent=31657"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/categories?post=31657"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/tags?post=31657"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}