<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Nginx 라우팅 설정을 위해 letsencrypt.conf의 내용을 붙임 &#8211; 준우블로그</title>
	<atom:link href="https://junewoo.com/tag/nginx-%eb%9d%bc%ec%9a%b0%ed%8c%85-%ec%84%a4%ec%a0%95%ec%9d%84-%ec%9c%84%ed%95%b4-letsencrypt-conf%ec%9d%98-%eb%82%b4%ec%9a%a9%ec%9d%84-%eb%b6%99%ec%9e%84/feed/" rel="self" type="application/rss+xml" />
	<link>https://junewoo.com</link>
	<description>또 하나의 준우블로그 사이트</description>
	<lastBuildDate>Sat, 16 Mar 2024 13:13:04 +0000</lastBuildDate>
	<language>ko-KR</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>
<site xmlns="com-wordpress:feed-additions:1">199246569</site>	<item>
		<title>개인 서버에 Ubuntu LEMP WORDPRESS 설치하기 12</title>
		<link>https://junewoo.com/%ea%b0%9c%ec%9d%b8-%ec%84%9c%eb%b2%84%ec%97%90-ubuntu-lemp-wordpress-%ec%84%a4%ec%b9%98%ed%95%98%ea%b8%b0-12/</link>
					<comments>https://junewoo.com/%ea%b0%9c%ec%9d%b8-%ec%84%9c%eb%b2%84%ec%97%90-ubuntu-lemp-wordpress-%ec%84%a4%ec%b9%98%ed%95%98%ea%b8%b0-12/#respond</comments>
		
		<dc:creator><![CDATA[cvilla]]></dc:creator>
		<pubDate>Sun, 10 Mar 2024 11:48:38 +0000</pubDate>
				<category><![CDATA[우분투서버 만들기]]></category>
		<category><![CDATA[HTTPS 적용을 위한 SSL 인증서 발급 받기]]></category>
		<category><![CDATA[letsencrypt.conf 파일 만들기]]></category>
		<category><![CDATA[Nginx 라우팅 설정을 위해 letsencrypt.conf의 내용을 붙임]]></category>
		<category><![CDATA[Nginx에 acme-challenge 폴더 위치]]></category>
		<category><![CDATA[snap 명령어로 classic certbot를 설치]]></category>
		<guid isPermaLink="false">https://junewoo.com/?p=1742</guid>

					<description><![CDATA[<p>Contents 1. 개인 서버 만들기, 파워, 케이스, 메인보드, CPU쿨러, SSD, 메모리(RAM), CPU 선정과 주문 조립 2. 공유기 설정하기, 공유기1 브릿지 모드 설정, iptime 공유기2 IPTV ... <a title="개인 서버에 Ubuntu LEMP WORDPRESS 설치하기 12" class="read-more" href="https://junewoo.com/%ea%b0%9c%ec%9d%b8-%ec%84%9c%eb%b2%84%ec%97%90-ubuntu-lemp-wordpress-%ec%84%a4%ec%b9%98%ed%95%98%ea%b8%b0-12/" aria-label="개인 서버에 Ubuntu LEMP WORDPRESS 설치하기 12에 대해 더 자세히 알아보세요">더 읽어보기</a></p>
<p>The post <a rel="nofollow" href="https://junewoo.com/%ea%b0%9c%ec%9d%b8-%ec%84%9c%eb%b2%84%ec%97%90-ubuntu-lemp-wordpress-%ec%84%a4%ec%b9%98%ed%95%98%ea%b8%b0-12/">개인 서버에 Ubuntu LEMP WORDPRESS 설치하기 12</a> appeared first on <a rel="nofollow" href="https://junewoo.com">준우블로그</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Contents</p>
<table style="border-collapse: collapse; width: 100%; height: 375px;">
<tbody>
<tr style="height: 25px;">
<td style="width: 100%; height: 25px;">1. <a href="https://junewoo.com/%EA%B0%9C%EC%9D%B8-%EC%84%9C%EB%B2%84%EC%97%90-ubuntu-lemp-wordpress-%EC%84%A4%EC%B9%98%ED%95%98%EA%B8%B0-1/">개인 서버 만들기, 파워, 케이스, 메인보드, CPU쿨러, SSD, 메모리(RAM), CPU 선정과 주문 조립</a></td>
</tr>
<tr style="height: 25px;">
<td style="width: 100%; height: 25px;"><a href="https://junewoo.com/%EA%B0%9C%EC%9D%B8-%EC%84%9C%EB%B2%84%EC%97%90-ubuntu-lemp-wordpress-%EC%84%A4%EC%B9%98%ED%95%98%EA%B8%B0-2/">2. 공유기 설정하기, 공유기1 브릿지 모드 설정, iptime 공유기2 IPTV 연결 설정<br />
</a></td>
</tr>
<tr style="height: 25px;">
<td style="width: 100%; height: 25px;"><a href="https://junewoo.com/%EA%B0%9C%EC%9D%B8-%EC%84%9C%EB%B2%84%EC%97%90-ubuntu-lemp-wordpress-%EC%84%A4%EC%B9%98%ED%95%98%EA%B8%B0-3/">3. 개인 서버에 Ubuntu 22.04.4 LTS 설치하기, Universal-USB-Installer를 사용하여 부팅 가능한 USB를 생성하기</a></td>
</tr>
<tr style="height: 25px;">
<td style="width: 100%; height: 25px;"><a href="https://junewoo.com/%EA%B0%9C%EC%9D%B8-%EC%84%9C%EB%B2%84%EC%97%90-ubuntu-lemp-wordpress-%EC%84%A4%EC%B9%98%ED%95%98%EA%B8%B0-4/">4. 개인 PC에 우분투 서버 접속용 3가지 SSH 설치, <span style="font-size: inherit; font-family: inherit;">자료실의 Putty, </span>EditPlus, <span style="font-size: inherit; font-family: inherit;">FileZilla 다운 후 설치하기</span></a></td>
</tr>
<tr style="height: 25px;">
<td style="width: 100%; height: 25px;"><a href="https://junewoo.com/%EA%B0%9C%EC%9D%B8-%EC%84%9C%EB%B2%84%EC%97%90-ubuntu-lemp-wordpress-%EC%84%A4%EC%B9%98%ED%95%98%EA%B8%B0-5/">5. 우분투 서버 환경 date 설정하기</a></td>
</tr>
<tr style="height: 25px;">
<td style="width: 100%; height: 25px;"><a href="https://junewoo.com/%EA%B0%9C%EC%9D%B8-%EC%84%9C%EB%B2%84%EC%97%90-ubuntu-lemp-wordpress-%EC%84%A4%EC%B9%98%ED%95%98%EA%B8%B0-6/">6. 웹 서버 Nginx 설치, <span style="font-size: inherit; font-family: inherit;">현재 iptables 규칙 초기화</span></a></td>
</tr>
<tr style="height: 25px;">
<td style="width: 100%; height: 25px;"><a href="https://junewoo.com/%EA%B0%9C%EC%9D%B8-%EC%84%9C%EB%B2%84%EC%97%90-ubuntu-lemp-wordpress-%EC%84%A4%EC%B9%98%ED%95%98%EA%B8%B0-7/">7. Ubuntu sever 폴더 권한 설정, <span style="font-size: inherit; font-family: inherit;">Nginx 페이지의 내용 수정과 권한 설정</span></a></td>
</tr>
<tr style="height: 25px;">
<td style="width: 100%; height: 25px;"><a href="https://junewoo.com/%EA%B0%9C%EC%9D%B8-%EC%84%9C%EB%B2%84%EC%97%90-ubuntu-lemp-wordpress-%EC%84%A4%EC%B9%98%ED%95%98%EA%B8%B0-8/">8. Nginx 서버에 PHP8.3 설치, <span style="font-size: inherit; font-family: inherit;">자주 쓰이는 php8.3 모듈 설치하기</span></a></td>
</tr>
<tr style="height: 25px;">
<td style="width: 100%; height: 25px;"><a href="https://junewoo.com/%EA%B0%9C%EC%9D%B8-%EC%84%9C%EB%B2%84%EC%97%90-ubuntu-lemp-wordpress-%EC%84%A4%EC%B9%98%ED%95%98%EA%B8%B0-9/">9. apt update와 upgrade가 완료 후 mariadb를 설치하기</a></td>
</tr>
<tr style="height: 25px;">
<td style="width: 100%; height: 25px;"><a href="https://junewoo.com/%ea%b0%9c%ec%9d%b8-%ec%84%9c%eb%b2%84%ec%97%90-ubuntu-lemp-wordpress-%ec%84%a4%ec%b9%98%ed%95%98%ea%b8%b0-10/">10. MariaDB 관리 도구 phpMyAdmin 설치하기</a></td>
</tr>
<tr style="height: 25px;">
<td style="width: 100%; height: 25px;"><a href="https://junewoo.com/%ea%b0%9c%ec%9d%b8-%ec%84%9c%eb%b2%84%ec%97%90-ubuntu-lemp-wordpress-%ec%84%a4%ec%b9%98%ed%95%98%ea%b8%b0-11/">11. 아사달에서 도메인 연결하기, <span style="font-size: inherit; font-family: inherit;">카페24에서 도메인 연결하기</span></a></td>
</tr>
<tr style="height: 25px;">
<td style="width: 100%; height: 25px; background-color: #ebdf09;"><a href="https://junewoo.com/%ea%b0%9c%ec%9d%b8-%ec%84%9c%eb%b2%84%ec%97%90-ubuntu-lemp-wordpress-%ec%84%a4%ec%b9%98%ed%95%98%ea%b8%b0-12/">12. HTTPS 적용을 위한 SSL 인증서 발급, <span style="font-size: inherit; font-family: inherit;"><span style="font-size: inherit; font-family: inherit;">Nginx에 acme-challenge 폴더 위치를 알리기 위하여 letsencrypt.conf 파일 만들기, </span></span>Let’s Encrypt SSL 발급 받기</a></td>
</tr>
<tr style="height: 25px;">
<td style="width: 100%; height: 25px;"><a href="https://junewoo.com/%ea%b0%9c%ec%9d%b8-%ec%84%9c%eb%b2%84%ec%97%90-ubuntu-lemp-wordpress-%ec%84%a4%ec%b9%98%ed%95%98%ea%b8%b0-13/">13. MariaDB에서 데이터베이스(DB) 만들기, phpMyAdmin에서 DB생성</a></td>
</tr>
<tr style="height: 25px;">
<td style="width: 100%; height: 25px;"><a href="https://junewoo.com/%ea%b0%9c%ec%9d%b8-%ec%84%9c%eb%b2%84%ec%97%90-ubuntu-lemp-wordpress-%ec%84%a4%ec%b9%98%ed%95%98%ea%b8%b0-14/">14. 워드프레스 설치, 우분투 서버에 ko.wordpress.org/latest-ko_KR.zip 파일 설치, wordpress.zip 파일 압축 풀기, 서버 폴더 소유자 권한 및 사용자 그룹 변경</a></td>
</tr>
<tr style="height: 25px;">
<td style="width: 100%; height: 25px; background-color: #f7f7f2;"><a href="https://junewoo.com/%ea%b0%9c%ec%9d%b8-%ec%84%9c%eb%b2%84%ec%97%90-ubuntu-lemp-wordpress-%ec%84%a4%ec%b9%98%ed%95%98%ea%b8%b0-15/">15. 워드프레스 설치 후 환경 설정, 우분투 서버에 wp-config.php에 임시디렉토리 설정, FTP 연결 정보 입력, Putty로 php.ini, nginx.conf를 수정</a></td>
</tr>
</tbody>
</table>
<h2>개인 서버에 Ubuntu LEMP WORDPRESS 설치하기 12</h2>
<p>개인 서버에 Ubuntu sever LEMP(Linux-ubuntu+Nginx+MariaDB-Phpmyadmin+PHP8.3) WORDPRESS 설치하기</p>
<p>개인 서버에 SSL 인증서를 무료로 발급받는 가장 대표적인 방법은 Let&#8217;s Encrypt를 사용하는 것입니다. Let&#8217;s Encrypt는 무료, 자동화된, 개방된 인증 기관(CA)으로, HTTPS를 통해 웹사이트의 보안을 강화하기 위해 무료 SSL/TLS 인증서를 제공합니다. 여기서는 Let&#8217;s Encrypt를 이용해 SSL 인증서를 발급받고 설치하는 기본적인 과정을 소개하겠습니다.</p>
<h2>12-1. HTTPS 적용을 위한 SSL 인증서 발급 받기</h2>
<p>먼저 Let&#8217;s Encrypt SSL 인증서를 발급받기 전 환경을 구성해 보겠습니다.</p>
<p>Let&#8217;s Encrypt SSL 발급을 위한 /.well-known/acme-challenge 를 구성하는데 여기서는 /var/www/ 아래 letsencrypt 라는 폴더를 만들어 그 아래 만들겠습니다/</p>
<p>명령창에 mkdir -p /var/www/letsencrypt/.well-known/acme-challenge 를 입력합니다.</p>
<pre id="code_1633400140094" class="bash" style="margin: 20px auto 0px; display: block; overflow: auto; padding: 20px; color: #383a42; background: #f8f8f8; font-size: 14px; font-family: 'SF Mono', Menlo, Consolas, Monaco, monospace; border: 1px solid #ebebeb; line-height: 1.71; cursor: default; z-index: 1; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;" data-ke-language="bash" data-ke-type="codeblock"><code class="hljs">junewoo@cvilla:~$ <span style="color: #ff0000;">mkdir -p /var/www/letsencrypt/.well-known/acme-challenge</span></code></pre>
<h2>12-2. Nginx에 acme-challenge 폴더 위치를 알리기 위하여 letsencrypt.conf 파일 만들기</h2>
<p>Nginx 라우팅 설정파일은 /etc/snippets/ 폴더에서 관리하는데 그 아래 letsencrypt.conf 파일을 만들고 여기서 로그인한 계정인 junewoo가 해당 폴더 권한이 없으므로 해당 권한 및 파일수정권한을 가져오도록 하겠습니다.</p>
<p>a. 명령창에 sudo touch /etc/nginx/snippets/letsencrypt.conf 를 입력합니다.<br />
b. 명령창에 sudo chown root:junewoo /etc/nginx/snippets/letsencrypt.conf 를 입력합니다.<br />
c. 명령창에sudo chmod 775 /etc/nginx/snippets/letsencrypt.conf 를 입력합니다.</p>
<pre id="code_1633400140094" class="bash" style="margin: 20px auto 0px; display: block; overflow: auto; padding: 20px; color: #383a42; background: #f8f8f8; font-size: 14px; font-family: 'SF Mono', Menlo, Consolas, Monaco, monospace; border: 1px solid #ebebeb; line-height: 1.71; cursor: default; z-index: 1; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;" data-ke-language="bash" data-ke-type="codeblock"><code class="hljs">junewoo@cvilla:~$ <span style="color: #ff0000;">sudo touch /etc/nginx/snippets/letsencrypt.conf</span>
junewoo@cvilla:~$ <span style="color: #ff0000;">sudo chown root:junewoo /etc/nginx/snippets/letsencrypt.conf</span>
junewoo@cvilla:~$ <span style="color: #ff0000;">sudo chmod 775 /etc/nginx/snippets/letsencrypt.conf</span></code></pre>
<p>nano 에디터로 letsencrypt.conf 파일을 수정합니다.</p>
<p>Putty 명령창에 sudo nano /etc/nginx/snippets/letsencrypt.conf를 입력합니다.</p>
<pre id="code_1633400140094" class="bash" style="margin: 20px auto 0px; display: block; overflow: auto; padding: 20px; color: #383a42; background: #f8f8f8; font-size: 14px; font-family: 'SF Mono', Menlo, Consolas, Monaco, monospace; border: 1px solid #ebebeb; line-height: 1.71; cursor: default; z-index: 1; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;" data-ke-language="bash" data-ke-type="codeblock"><code class="hljs">junewoo@cvilla:~$ <span style="color: #ff0000;">sudo nano /etc/nginx/snippets/letsencrypt.conf</span></code></pre>
<p>화면이 나오면 아래 내용을 붙여줍니다. (드래그하여 CTRL + C 한후 PuTTY 화면에서 마우스 오른쪽 버튼 클릭)</p>
<p>location ^~ /.well-known/acme-challenge/ {<br />
default_type &#8220;text/plain&#8221;;<br />
root /var/www/letsencrypt;<br />
}</p>
<p>그 다음 CTRL + X 한 후 Y를 누르고 파일명이 나오면 Enter키를 눌러줍니다.</p>
<p><img data-recalc-dims="1" fetchpriority="high" decoding="async" class="alignnone wp-image-1753" src="https://i0.wp.com/junewoo.com/wp-content/uploads/2024/03/noname5-1.png?resize=859%2C544&#038;ssl=1" alt="" width="859" height="544" srcset="https://i0.wp.com/junewoo.com/wp-content/uploads/2024/03/noname5-1.png?resize=300%2C190&amp;ssl=1 300w, https://i0.wp.com/junewoo.com/wp-content/uploads/2024/03/noname5-1.png?resize=768%2C487&amp;ssl=1 768w, https://i0.wp.com/junewoo.com/wp-content/uploads/2024/03/noname5-1.png?w=827&amp;ssl=1 827w" sizes="(max-width: 859px) 100vw, 859px" /></p>
<pre id="code_1633400140094" class="bash" style="margin: 20px auto 0px; display: block; overflow: auto; padding: 20px; color: #383a42; background: #f8f8f8; font-size: 14px; font-family: 'SF Mono', Menlo, Consolas, Monaco, monospace; border: 1px solid #ebebeb; line-height: 1.71; cursor: default; z-index: 1; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;" data-ke-language="bash" data-ke-type="codeblock"><span style="color: #ff0000;"><code class="hljs">ocation ^~ /.well-known/acme-challenge/ {
default_type "text/plain";
root /var/www/letsencrypt;
}</code></span></pre>
<p>&nbsp;</p>
<h2>12-3. Nginx 라우팅 설정을 위해 letsencrypt.conf의 내용을 붙여줍니다.</h2>
<p>Editplus 에서 /etc/nginx/sites-available/default 를 수정합니다.</p>
<p>server_name 도메인명; 아래 include /etc/nginx/snippets/letsencrypt.conf; 를 붙여줍니다.</p>
<p>그러면 nginx 라우팅 설정은 다음과 같이 됩니다.</p>
<pre id="code_1633400140094" class="bash" style="margin: 20px auto 0px; display: block; overflow: auto; padding: 20px; color: #383a42; background: #f8f8f8; font-size: 14px; font-family: 'SF Mono', Menlo, Consolas, Monaco, monospace; border: 1px solid #ebebeb; line-height: 1.71; cursor: default; z-index: 1; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;" data-ke-language="bash" data-ke-type="codeblock"><code class="hljs"># Default server configuration
server {
	listen 80 default_server;
	listen [::]:80 default_server;

	root /var/www/html;
	index index.php index.html index.htm index.nginx-debian.html;

	server_name junewoo.com;
    
    <span style="color: #ff0000;">include /etc/nginx/snippets/letsencrypt.conf;</span>   ### .well-know/acme-challenge 알림

	location / {
		try_files $uri $uri/ =404;
       if (!-e $request_filename) { 
         rewrite ^.*$ /index.php last;         
		}
	}

	location ~ \.php$ {
		include snippets/fastcgi-php.conf;
		fastcgi_pass unix:/run/php/php8.3-fpm.sock;
		fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 
		include fastcgi_params;
		fastcgi_read_timeout 300;
	}

	location ~ /\.ht {
	    deny all;
	}
}

### HTTP (CNAME 연결 www.junewoo.com to junewoo.com) ###
 server {
    listen 80;
    listen [::]:80; 
    server_name www.junewoo.com;

	include /etc/nginx/snippets/letsencrypt.conf;   # .well-know/acme-challenge 알림

    location / { 
        return 301 http://junewoo.com$request_uri;     ### http://junewoo.com 로 리다이렉팅 
    }
}</code></pre>
<p>위 내용을 적용해 주기 위하여 nginx를 재가동 합니다.</p>
<p>명령창에 sudo nginx -t 와 sudo service nginx restart 를 입력합니다.</p>
<pre id="code_1633400140094" class="bash" style="margin: 20px auto 0px; display: block; overflow: auto; padding: 20px; color: #383a42; background: #f8f8f8; font-size: 14px; font-family: 'SF Mono', Menlo, Consolas, Monaco, monospace; border: 1px solid #ebebeb; line-height: 1.71; cursor: default; z-index: 1; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;" data-ke-language="bash" data-ke-type="codeblock"><code class="hljs">junewoo@cvilla:~$ <span style="color: #ff0000;">sudo nginx -t</span>
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
junewoo@cvilla:~$ <span style="color: #ff0000;">sudo service nginx restart</span></code></pre>
<p>이제 Let&#8217;s Encrypt SSL 발급을 위한 환경이 모두 갖추어졌습니다.</p>
<h2>12-4.  Let&#8217;s Encrypt SSL를 발급 받아 보겠습니다.</h2>
<p>certbot-auto 로는 설치 시 에러가 발생합니다. snap 명령어로 classic certbot를 설치합니다.</p>
<p>a. Putty 명령창에 sudo snap install core; sudo snap refresh core 를 입력합니다.</p>
<p>b. 명령창에 sudo snap install &#8211;classic certbot 를 입력합니다.</p>
<p>c. 명령창에 sudo ln -s /snap/bin/certbot /usr/bin/certbot 를 입력합니다.</p>
<pre id="code_1633400140094" class="bash" style="margin: 20px auto 0px; display: block; overflow: auto; padding: 20px; color: #383a42; background: #f8f8f8; font-size: 14px; font-family: 'SF Mono', Menlo, Consolas, Monaco, monospace; border: 1px solid #ebebeb; line-height: 1.71; cursor: default; z-index: 1; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;" data-ke-language="bash" data-ke-type="codeblock"><code class="hljs">junewoo@cvilla:~$ </code><code class="hljs"><span style="color: #ff0000;">sudo snap install core; sudo snap refresh core</span>
junewoo@cvilla:~$ <span style="color: #ff0000;">sudo snap install --classic certbot</span>
junewoo@cvilla:~$ <span style="color: #ff0000;">sudo ln -s /snap/bin/certbot /usr/bin/certbot</span></code></pre>
<h2>12-5. Certbot을 이용하여 HTTPS SSL 인증서를 발급받습니다.</h2>
<p>명령창에 sudo certbot certonly &#8211;webroot &#8211;agree-tos &#8211;no-eff-email &#8211;email 이메일주소 -w /var/www/letsencrypt -d 도메인명 -d 도메인명(www포함) 를 입력합니다.</p>
<pre id="code_1633400140094" class="bash" style="margin: 20px auto 0px; display: block; overflow: auto; padding: 20px; color: #383a42; background: #f8f8f8; font-size: 14px; font-family: 'SF Mono', Menlo, Consolas, Monaco, monospace; border: 1px solid #ebebeb; line-height: 1.71; cursor: default; z-index: 1; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;" data-ke-language="bash" data-ke-type="codeblock"><code class="hljs">junewoo@cvilla:~$ <span style="color: #ff0000;">sudo certbot certonly --webroot --agree-tos --no-eff-email --email cvilla@hanmail.net -w /var/www/letsencrypt  -d junewoo.com  -d www.junewoo.com</span></code></pre>
<p>이어서 설치하겠냐는 질문이 나오면 Y를 누릅니다.</p>
<p>After this operation, 194 MB of additional disk space will be used.<br />
Do you want to continue? [Y/n]  y 를 입력합니다.</p>
<pre id="code_1633400140094" class="bash" style="margin: 20px auto 0px; display: block; overflow: auto; padding: 20px; color: #383a42; background: #f8f8f8; font-size: 14px; font-family: 'SF Mono', Menlo, Consolas, Monaco, monospace; border: 1px solid #ebebeb; line-height: 1.71; cursor: default; z-index: 1; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;" data-ke-language="bash" data-ke-type="codeblock"><code class="hljs">Requesting to rerun /home/ubuntu/certbot-auto with root privileges...
Bootstrapping dependencies for Debian-based OSes... (you can skip this with --no-bootstrap)
Hit:1 http://ap-seoul-1-ad-1.clouds.archive.ubuntu.com/ubuntu bionic InRelease
Get:2 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Hit:3 http://ppa.launchpad.net/ondrej/php/ubuntu bionic InRelease
Get:4 http://ap-seoul-1-ad-1.clouds.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:5 http://ap-seoul-1-ad-1.clouds.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Fetched 252 kB in 2s (125 kB/s)
Reading package lists... Done
Reading package lists... Done

............................................................

IMPORTANT NOTES:
 - <span style="color: #ff0000;">Congratulations! Your certificate and chain have been saved at</span>:
   /etc/letsencrypt/live/itreport.tk/fullchain.pem
   Your key file has been saved at:
   /etc/letsencrypt/live/itreport.tk/privkey.pem
   Your cert will expire on 2024-05-21. To obtain a new or tweaked
   version of this certificate in the future, simply run certbot-auto
   again. To non-interactively renew *all* of your certificates, run
   "certbot-auto renew"
 - Your account credentials have been saved in your Certbot
   configuration directory at /etc/letsencrypt. You should make a
   secure backup of this folder now. This configuration directory will
   also contain certificates and private keys obtained by Certbot so
   making regular backups of this folder is ideal.
 - If you like Certbot, please consider supporting our work by:

   Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate
   Donating to EFF:                    https://eff.org/donate-le</code></pre>
<p>&nbsp;</p>
<p>설치가 되면 마지막부분에 IMPORTANT NOTES: 에 Congratulations!이라고 시작하면서 HTTPS 인증서 파일 및 개인암호키가 저장되었다고 나옵니다. 또, expire on 2024-05-21 이라고 표시된 인증서 만료일도 나타납니다.</p>
<h2>12-6. 잘 설치 저장이 되었는지 확인해 보겠습니다.</h2>
<p>명령창에 sudo ls -al /etc/letsencrypt/live/도메인명 을 입력합니다.</p>
<p>아래처럼 나오면 정상적으로 SSL키가 발급되어 저장된 것입니다.</p>
<pre id="code_1633400140094" class="bash" style="margin: 20px auto 0px; display: block; overflow: auto; padding: 20px; color: #383a42; background: #f8f8f8; font-size: 14px; font-family: 'SF Mono', Menlo, Consolas, Monaco, monospace; border: 1px solid #ebebeb; line-height: 1.71; cursor: default; z-index: 1; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;" data-ke-language="bash" data-ke-type="codeblock"><code class="hljs">junewoo@cvilla:~$ <span style="color: #ff0000;">sudo ls -al /etc/letsencrypt/live/junewoo.com</span>
total 12
drwxr-xr-x 2 root root 4096 Feb 21 20:57 .
drwx------ 4 root root 4096 Dec 23 18:43 ..
lrwxrwxrwx 1 root root   35 Feb 21 20:57 cert.pem -&gt; ../../archive/junewoo.com/cert2.pem
lrwxrwxrwx 1 root root   36 Feb 21 20:57 chain.pem -&gt; ../../archive/junewoo.com/chain2.pem
lrwxrwxrwx 1 root root   40 Feb 21 20:57 fullchain.pem -&gt; ../../archive/junewoo.com/fullchain2.pem
lrwxrwxrwx 1 root root   38 Feb 21 20:57 privkey.pem -&gt; ../../archive/junewoo.com/privkey2.pem
-rw-r--r-- 1 root root  692 Dec 23 09:27 README
junewoo@cvilla:~$</code></pre>
<h2>12-7. 인증서 만료 시일을 확인해 보게습니다.</h2>
<p>명령창에 sudo certbot certificates -d 도메인명을 입력합니다.</p>
<pre id="code_1633400140094" class="bash" style="margin: 20px auto 0px; display: block; overflow: auto; padding: 20px; color: #383a42; background: #f8f8f8; font-size: 14px; font-family: 'SF Mono', Menlo, Consolas, Monaco, monospace; border: 1px solid #ebebeb; line-height: 1.71; cursor: default; z-index: 1; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;" data-ke-language="bash" data-ke-type="codeblock"><code class="hljs">junewoo@cvilla:~$ <span style="color: #ff0000;">sudo certbot certificates -d junewoo.com</span>
Saving debug log to /var/log/letsencrypt/letsencrypt.log

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Found the following matching certs:
  Certificate Name: junewoo.com-0001
    Serial Number: 48543f944489b38b1c1db9898849009ae56
    Key Type: ECDSA
    Domains: junewoo.com
    Expiry Date: 2024-05-21 10:56:50+00:00 (VALID: 69 days)
    Certificate Path: /etc/letsencrypt/live/junewoo.com-0001/fullchain.pem
    Private Key Path: /etc/letsencrypt/live/junewoo.com-0001/privkey.pem
  Certificate Name: junewoo.com
    Serial Number: 41c8011902b7b99fc364919f4c551da18ed
    Key Type: ECDSA
    Domains: junewoo.com www.junewoo.com
    Expiry Date: 2024-05-21 10:57:01+00:00 (VALID: 69 days)
    Certificate Path: /etc/letsencrypt/live/junewoo.com/fullchain.pem
    Private Key Path: /etc/letsencrypt/live/junewoo.com/privkey.pem
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
junewoo@cvilla:~$</code></pre>
<p>만료일 시 가 Expiry Date: 2024-05-21 10:57:01+00:00 (VALID: 69 days)로 나타납니다.</p>
<p>인증서 갱신은 나중에 워드프레스에 정말 간단한 SSL 플러그인을 설치하시면 자동으로 갱신이 됩니다.</p>
<p>이번에는 SSL 인증서를 웹서버인 Nginx에 적용해 보겠습니다.</p>
<h2>12-8. 인증서를 적용하기 위해 openssl을 사용하여 dhparam을 암호화 합니다.</h2>
<p>명령창에 sudo openssl dhparam -out /etc/nginx/dhparam.pem 4096 를 입력합니다.</p>
<p>진행 시간이 20~30분 정도 걸립니다.</p>
<pre id="code_1633400140094" class="bash" style="margin: 20px auto 0px; display: block; overflow: auto; padding: 20px; color: #383a42; background: #f8f8f8; font-size: 14px; font-family: 'SF Mono', Menlo, Consolas, Monaco, monospace; border: 1px solid #ebebeb; line-height: 1.71; cursor: default; z-index: 1; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;" data-ke-language="bash" data-ke-type="codeblock"><code class="hljs">junewoo@cvilla:~$ <span style="color: #ff0000;">sudo openssl dhparam -out /etc/nginx/dhparam.pem 4096</span>
Generating DH parameters, 4096 bit long safe prime, generator 2
This is going to take a long time
..............................+...................................................
............................+.....................................................
..................................................................................
....+..+............................+.............................................
..................................................................................
..................................................................................
.........................+........................................................
...........................................................+......................
.............................................+....................................
..................................................................................
..................................................................+...............
..................................................................................
.........................................+......................................+.
..................................................................................
..................................................................................
..............................................................................+...
.....+............................................................................
..................................................................................
.............................+............................+.......................
..................................................................................
........+.........................................................................
..........................................................+.......................
................................................................+...+.............
................+.....................+...........................................
........................................................++*++*++*</code></pre>
<p>드디어 dhparam.pem이 생성되었다면 이제 ssl.conf를 생성해 보겠습니다.</p>
<p>명령창에 sudo touch /etc/nginx/snippets/ssl.conf 와 sudo chmod 777 /etc/nginx/snippets/ssl.conf 를 입력합니다.</p>
<pre id="code_1633400140094" class="bash" style="margin: 20px auto 0px; display: block; overflow: auto; padding: 20px; color: #383a42; background: #f8f8f8; font-size: 14px; font-family: 'SF Mono', Menlo, Consolas, Monaco, monospace; border: 1px solid #ebebeb; line-height: 1.71; cursor: default; z-index: 1; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;" data-ke-language="bash" data-ke-type="codeblock"><code class="hljs">junewoo@cvilla:~$ <span style="color: #ff0000;">sudo touch /etc/nginx/snippets/ssl.conf</span>
junewoo@cvilla:~$ <span style="color: #ff0000;">sudo chmod 777 /etc/nginx/snippets/ssl.conf</span></code></pre>
<h2>12-9. 생성된 ssl.conf에 보안설정문을 입력합니다.</h2>
<p>ssl.conf 보안설정문 입력을 위하여 Editplus로 접속하여 /etc/nginx/snippets/에 접속 ssl.conf 파일을 열어 아래 내용을 입력합니다.</p>
<p>또는 Putty 명령창에 sudo nano /etc/nginx/snippets/ssl.conf 를 입력합니다.</p>
<pre id="code_1633400140094" class="bash" style="margin: 20px auto 0px; display: block; overflow: auto; padding: 20px; color: #383a42; background: #f8f8f8; font-size: 14px; font-family: 'SF Mono', Menlo, Consolas, Monaco, monospace; border: 1px solid #ebebeb; line-height: 1.71; cursor: default; z-index: 1; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;" data-ke-language="bash" data-ke-type="codeblock"><code class="hljs">junewoo@cvilla:~$ <span style="color: #ff0000;">sudo nano /etc/nginx/snippets/ssl.conf
</span></code></pre>
<p>아래 내용을 드래그 하신 후 CTRL + C 하시고 PuTTY화면에서 마우스 오른쪽을 눌러 붙이신 후 CTRL + X하시고 Yes을 누르신 다음 파일명이 나오면 Enter키를 누르시면 됩니다.</p>
<p>ssl_session_timeout 1d;<br />
ssl_session_cache shared:SSL:50m;<br />
ssl_session_tickets off;<br />
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;<br />
ssl_dhparam /etc/nginx/dhparam.pem;<br />
ssl_ciphers ECDHE-RSA-AES256-GCM-SHA512:DHE-RSA-AES256-GCM-SHA512:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384;<br />
ssl_ecdh_curve secp384r1;<br />
ssl_prefer_server_ciphers on;<br />
ssl_stapling on;<br />
ssl_stapling_verify on;<br />
resolver 8.8.8.8 8.8.4.4;<br />
add_header Strict-Transport-Security &#8220;max-age=15768000; includeSubdomains; preload&#8221;;<br />
add_header X-Content-Type-Options nosniff;<br />
add_header X-Frame-Options &#8220;SAMEORIGIN&#8221;;</p>
<pre id="code_1633400140094" class="bash" style="margin: 20px auto 0px; display: block; overflow: auto; padding: 20px; color: #383a42; background: #f8f8f8; font-size: 14px; font-family: 'SF Mono', Menlo, Consolas, Monaco, monospace; border: 1px solid #ebebeb; line-height: 1.71; cursor: default; z-index: 1; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;" data-ke-language="bash" data-ke-type="codeblock"><span style="color: #ff0000;"><code class="hljs">ssl_session_timeout 1d;
ssl_session_cache shared:SSL:50m;
ssl_session_tickets off;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_dhparam /etc/nginx/dhparam.pem;
ssl_ciphers ECDHE-RSA-AES256-GCM-SHA512:DHE-RSA-AES256-GCM-SHA512:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384;
ssl_ecdh_curve secp384r1;
ssl_prefer_server_ciphers on;
ssl_stapling on;
ssl_stapling_verify on;
resolver 8.8.8.8 8.8.4.4;
add_header Strict-Transport-Security "max-age=15768000; includeSubdomains; preload";
add_header X-Content-Type-Options nosniff;
add_header X-Frame-Options "SAMEORIGIN";</code></span></pre>
<h2>12-10. ssl.conf가 작성이 완료되면 수정할 수 없도록 권한을 변경합니다.</h2>
<p>명령창에 sudo chmod 644 /etc/nginx/snippets/ssl.conf 를 입력합니다.</p>
<pre id="code_1633400140094" class="bash" style="margin: 20px auto 0px; display: block; overflow: auto; padding: 20px; color: #383a42; background: #f8f8f8; font-size: 14px; font-family: 'SF Mono', Menlo, Consolas, Monaco, monospace; border: 1px solid #ebebeb; line-height: 1.71; cursor: default; z-index: 1; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;" data-ke-language="bash" data-ke-type="codeblock"><code class="hljs">junewoo@cvilla:~$ <span style="color: #ff0000;">sudo chmod 644 /etc/nginx/snippets/ssl.conf</span></code></pre>
<p>&nbsp;</p>
<h2>12-11. 이제 nginx에 라우팅을 적용해 보겠습니다.</h2>
<p>전체적으로 HTTPS가 적용된 도메인으로 운영하기 위하여 /etc/nginx/sites-available/default 파일을 수정합니다.</p>
<p>내용이 복잡하기에 에디터로 수정하시는 것을 추천합니다.</p>
<p>아래 내용을 자신의 도메인 이름으로 변경하여 전체 내용을 복사(Ctrl+C) 붙여넣기(Ctrl+V)를 합니다.</p>
<p>제가 작성한 도메인은 junewoo.com 입니다. 해당 내용을 본인이 등록한 도메인 이름으로 변경해 주시면 됩니다.</p>
<pre id="code_1633400140094" class="bash" style="margin: 20px auto 0px; display: block; overflow: auto; padding: 20px; color: #383a42; background: #f8f8f8; font-size: 14px; font-family: 'SF Mono', Menlo, Consolas, Monaco, monospace; border: 1px solid #ebebeb; line-height: 1.71; cursor: default; z-index: 1; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;" data-ke-language="bash" data-ke-type="codeblock"><code class="hljs"># Default server configuration
#
server {
	listen 80 default_server;
	listen [::]:80 default_server;

	# SSL configuration
	#
	 listen 443 ssl default_server;
	 listen [::]:443 ssl default_server;
	 ssl_certificate /etc/letsencrypt/live/junewoo.com/fullchain.pem;
         ssl_certificate_key /etc/letsencrypt/live/junewoo.com/privkey.pem;
	#
	# Note: You should disable gzip for SSL traffic.
	# See: https://bugs.debian.org/773332
	#
	# Read up on ssl_ciphers to ensure a secure configuration.
	# See: https://bugs.debian.org/765782
	#
	# Self signed certs generated by the ssl-cert package
	# Don't use them in a production server!
	#
	# include snippets/snakeoil.conf;

	root /var/www/html;

	# Add index.php to the list if you are using PHP
	index index.php index.html index.htm index.nginx-debian.html;

	server_name junewoo.com;

        include /etc/nginx/snippets/letsencrypt.conf;   ### .well-know/acme-challenge 알림

	location / {
		# First attempt to serve request as file, then
		# as directory, then fall back to displaying a 404.
		try_files $uri $uri/ =404;
	       if (!-e $request_filename) { 
                rewrite ^.*$ /index.php last;
                }	
	}

	# pass PHP scripts to FastCGI server

	location ~ \.php$ {
		include snippets/fastcgi-php.conf;
		fastcgi_pass unix:/run/php/php8.2-fpm.sock;
		fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 
		include fastcgi_params;
		fastcgi_read_timeout 300;
	}

	location ~ /\.ht {
	    deny all;
	}
}

### HTTP (CNAME 연결 www.junewoo.com to junewoo.com ) ###
server {
    listen 80;
    listen [::]:80; 
    server_name www.junewoo.com;

    location / { 
        return 301 http://junewoo.com$request_uri;     ### http://junewoo.com 로 리다이렉팅 
    }
}

# Virtual Host configuration for example.com
#
# You can move that to a different file under sites-available/ and symlink that
# to sites-enabled/ to enable it.
#
#server {
#	listen 80;
#	listen [::]:80;
#
#	server_name example.com;
#
#	root /var/www/example.com;
#	index index.html;
#
#	location / {
#		try_files $uri $uri/ =404;
#	}
#}</code></pre>
<p>다음은 에디터 갭쳐 화면입니다.</p>
<p><img data-recalc-dims="1" decoding="async" class="alignnone wp-image-1773" src="https://i0.wp.com/junewoo.com/wp-content/uploads/2024/03/noname-4.png?resize=860%2C1062&#038;ssl=1" alt="" width="860" height="1062" srcset="https://i0.wp.com/junewoo.com/wp-content/uploads/2024/03/noname-4.png?resize=243%2C300&amp;ssl=1 243w, https://i0.wp.com/junewoo.com/wp-content/uploads/2024/03/noname-4.png?resize=829%2C1024&amp;ssl=1 829w, https://i0.wp.com/junewoo.com/wp-content/uploads/2024/03/noname-4.png?resize=768%2C948&amp;ssl=1 768w, https://i0.wp.com/junewoo.com/wp-content/uploads/2024/03/noname-4.png?w=1099&amp;ssl=1 1099w" sizes="(max-width: 860px) 100vw, 860px" /></p>
<h2>12-12. Nginx를 다시 재가동하고 사이트에서 확인해 봅니다.</h2>
<p>명령창에 sudo nginx -t 를 입력합니다.</p>
<p>명령창에 sudo service nginx restart 를 입력합니다.</p>
<pre id="code_1633400140094" class="bash" style="margin: 20px auto 0px; display: block; overflow: auto; padding: 20px; color: #383a42; background: #f8f8f8; font-size: 14px; font-family: 'SF Mono', Menlo, Consolas, Monaco, monospace; border: 1px solid #ebebeb; line-height: 1.71; cursor: default; z-index: 1; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;" data-ke-language="bash" data-ke-type="codeblock"><code class="hljs">junewoo@cvilla:~$ <span style="color: #ff0000;">sudo nginx -t</span>
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
junewoo@cvilla:~$ <span style="color: #ff0000;">sudo service nginx restart</span>
junewoo@cvilla:~$</code></pre>
<p>웹브라우저에서 확인해보면 HTTPS가 적용된 것을 확인할 수 있습니다.</p>
<p><img data-recalc-dims="1" decoding="async" class="alignnone wp-image-1778" src="https://i0.wp.com/junewoo.com/wp-content/uploads/2024/03/noname2-2.png?resize=860%2C829&#038;ssl=1" alt="" width="860" height="829" srcset="https://i0.wp.com/junewoo.com/wp-content/uploads/2024/03/noname2-2.png?resize=300%2C289&amp;ssl=1 300w, https://i0.wp.com/junewoo.com/wp-content/uploads/2024/03/noname2-2.png?resize=1024%2C986&amp;ssl=1 1024w, https://i0.wp.com/junewoo.com/wp-content/uploads/2024/03/noname2-2.png?resize=768%2C739&amp;ssl=1 768w, https://i0.wp.com/junewoo.com/wp-content/uploads/2024/03/noname2-2.png?w=1443&amp;ssl=1 1443w" sizes="(max-width: 860px) 100vw, 860px" /></p>
<p>이상으로 길고도 힘든 SSL 설치 과정이었습니다.</p>
<p>마지막에서 홈 페이지에 적용이 잘 안되시면 나중에 워드프레스설치 후 &#8220;정말 간단한 SSL&#8221; 플러그인을 설치하시기를 추천합니다.</p>
<p>다음글은 MariaDB와 phpMyAdmin 의 설정입니다.</p>
<h2><a href="https://junewoo.com/%ea%b0%9c%ec%9d%b8-%ec%84%9c%eb%b2%84%ec%97%90-ubuntu-lemp-wordpress-%ec%84%a4%ec%b9%98%ed%95%98%ea%b8%b0-13/">개인 서버에 Ubuntu LEMP WORDPRESS 설치하기 13</a></h2>
<div class='kakaotalk_link' style='float:right;'><a href="javascript:SendKakao('준우블로그', '개인 서버에 Ubuntu LEMP WORDPRESS 설치하기 12', 'https://junewoo.com/%ea%b0%9c%ec%9d%b8-%ec%84%9c%eb%b2%84%ec%97%90-ubuntu-lemp-wordpress-%ec%84%a4%ec%b9%98%ed%95%98%ea%b8%b0-12/');"><img data-recalc-dims="1" src="https://i0.wp.com/junewoo.com/wp-content/plugins/kakao-talk-link/kakaotalk.png?w=860&#038;ssl=1" alt='Smart phone only'></a></div><div class="korea-sns"><div class="korea-sns-post korea-sns-pos-left"><div class="korea-sns-button korea-sns-facebook" OnClick="SendSNS('facebook', '개인 서버에 Ubuntu LEMP WORDPRESS 설치하기 12 - 준우블로그', 'https://junewoo.com/%ea%b0%9c%ec%9d%b8-%ec%84%9c%eb%b2%84%ec%97%90-ubuntu-lemp-wordpress-%ec%84%a4%ec%b9%98%ed%95%98%ea%b8%b0-12/', '', 0);"  style="background-image:url('https://junewoo.com/wp-content/plugins/korea-sns/icons/facebook.png');"></div><div class="korea-sns-button korea-sns-twitter" OnClick="SendSNS('twitter', '개인 서버에 Ubuntu LEMP WORDPRESS 설치하기 12 - 준우블로그', 'https://junewoo.com/%ea%b0%9c%ec%9d%b8-%ec%84%9c%eb%b2%84%ec%97%90-ubuntu-lemp-wordpress-%ec%84%a4%ec%b9%98%ed%95%98%ea%b8%b0-12/', '', 0);"  style="background-image:url('https://junewoo.com/wp-content/plugins/korea-sns/icons/twitter.png');"></div><div class="korea-sns-button korea-sns-telegram" OnClick="SendSNS('telegram', '개인 서버에 Ubuntu LEMP WORDPRESS 설치하기 12 - 준우블로그', 'https://junewoo.com/%ea%b0%9c%ec%9d%b8-%ec%84%9c%eb%b2%84%ec%97%90-ubuntu-lemp-wordpress-%ec%84%a4%ec%b9%98%ed%95%98%ea%b8%b0-12/', '', 0);"  style="background-image:url('https://junewoo.com/wp-content/plugins/korea-sns/icons/telegram.png');"></div><div class="korea-sns-button korea-sns-naverband" OnClick="SendSNS('naverband', '개인 서버에 Ubuntu LEMP WORDPRESS 설치하기 12 - 준우블로그', 'https://junewoo.com/%ea%b0%9c%ec%9d%b8-%ec%84%9c%eb%b2%84%ec%97%90-ubuntu-lemp-wordpress-%ec%84%a4%ec%b9%98%ed%95%98%ea%b8%b0-12/', '', 0);"  style="background-image:url('https://junewoo.com/wp-content/plugins/korea-sns/icons/naverband.png');"></div><div class="korea-sns-button korea-sns-naverblog" OnClick="SendSNS('naverblog', '개인 서버에 Ubuntu LEMP WORDPRESS 설치하기 12 - 준우블로그', 'https://junewoo.com/%ea%b0%9c%ec%9d%b8-%ec%84%9c%eb%b2%84%ec%97%90-ubuntu-lemp-wordpress-%ec%84%a4%ec%b9%98%ed%95%98%ea%b8%b0-12/', '', 0);"  style="background-image:url('https://junewoo.com/wp-content/plugins/korea-sns/icons/naverblog.png');"></div><div class="korea-sns-button korea-sns-copyurl" OnClick="SendSNS('copyurl', '개인 서버에 Ubuntu LEMP WORDPRESS 설치하기 12 - 준우블로그', 'https://junewoo.com/%ea%b0%9c%ec%9d%b8-%ec%84%9c%eb%b2%84%ec%97%90-ubuntu-lemp-wordpress-%ec%84%a4%ec%b9%98%ed%95%98%ea%b8%b0-12/', '', 0);"  style="background-image:url('https://junewoo.com/wp-content/plugins/korea-sns/icons/copyurl.png');"></div></div><div style="clear:both;"></div></div><p>The post <a rel="nofollow" href="https://junewoo.com/%ea%b0%9c%ec%9d%b8-%ec%84%9c%eb%b2%84%ec%97%90-ubuntu-lemp-wordpress-%ec%84%a4%ec%b9%98%ed%95%98%ea%b8%b0-12/">개인 서버에 Ubuntu LEMP WORDPRESS 설치하기 12</a> appeared first on <a rel="nofollow" href="https://junewoo.com">준우블로그</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://junewoo.com/%ea%b0%9c%ec%9d%b8-%ec%84%9c%eb%b2%84%ec%97%90-ubuntu-lemp-wordpress-%ec%84%a4%ec%b9%98%ed%95%98%ea%b8%b0-12/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1742</post-id>	</item>
	</channel>
</rss>
