<?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>서버관리 &amp;gt; Server &amp;gt; Ubuntu</title>
<link>https://blog.uidc.co.kr/ubuntu</link>
<language>ko</language>
<description>Ubuntu (2026-06-24 10:57:29)</description>

<item>
<title>[Centos7] Apache SSL 인증서 비밀번호 검증 없애기</title>
<link>https://blog.uidc.co.kr/ubuntu/centos7-apache-ssl-%EC%9D%B8%EC%A6%9D%EC%84%9C-%EB%B9%84%EB%B0%80%EB%B2%88%ED%98%B8-%EA%B2%80%EC%A6%9D-%EC%97%86%EC%95%A0%EA%B8%B0/</link>
<description><![CDATA[<pre class="bash" style="margin:0px;padding:0px;white-space:pre-wrap;color:rgb(85,85,85);"><code class="hljs language-bash" style="margin:15px 0px;padding:10px;white-space:pre;max-width:100%;max-height:600px;color:rgb(171,178,191);background:rgb(40,44,52);line-height:19.5px;"></code></pre><code class="hljs language-bash" style="margin:15px 0px;padding:10px;white-space:pre;max-width:100%;max-height:600px;color:rgb(171,178,191);background:rgb(40,44,52);line-height:19.5px;">$ service httpd startRedirecting to /bin/systemctl start httpd.serviceEnter TLS private key passphrase <span class="hljs-keyword" style="color:rgb(198,120,221);">for</span> 127.0.0.1:443 (RSA) :</code><p><code class="hljs language-bash" style="margin:15px 0px;padding:10px;white-space:pre;max-width:100%;max-height:600px;color:rgb(171,178,191);background:rgb(40,44,52);line-height:19.5px;"><br /></code></p><code class="hljs language-bash" style="margin:15px 0px;padding:10px;white-space:pre;max-width:100%;max-height:600px;color:rgb(171,178,191);background:rgb(40,44,52);line-height:19.5px;"></code><p><code class="hljs language-bash" style="margin:15px 0px;padding:10px;white-space:pre;max-width:100%;max-height:600px;color:rgb(171,178,191);background:rgb(40,44,52);line-height:19.5px;"><code class="hljs language-bash" style="margin:15px 0px;padding:10px;white-space:pre;max-width:100%;max-height:600px;color:rgb(171,178,191);background:rgb(40,44,52);line-height:19.5px;"> </code></code></p><code class="hljs language-bash" style="margin:15px 0px;padding:10px;white-space:pre;max-width:100%;max-height:600px;color:rgb(171,178,191);background:rgb(40,44,52);line-height:19.5px;"></code><p style="margin:0px 0px 20px;font-size:0.9375em;line-height:2;color:rgb(85,85,85);font-family:AppleSDGothicNeo, 'Noto Sans KR', sans-serif;"> </p><p style="margin:0px 0px 20px;font-size:0.9375em;line-height:2;color:rgb(85,85,85);font-family:AppleSDGothicNeo, 'Noto Sans KR', sans-serif;">지난 시간에 위와 같이 Apache에 SSL 설정을 하여 HTTPS 프로토콜로 웹 서비스를 제공할 수 있도록 하였다. 위 설정은 한가지 문제가 발생하는데 서비스를 재시작하거나 리눅스를 재부팅하면 매번 구동할 때마다 비밀번호를 입력해주어야 한다. 이런 경우를 대비하여 비밀키에 비밀번호를 제거해보자.</p><pre class="bash" style="margin:0px;padding:0px;white-space:pre-wrap;color:rgb(85,85,85);"><code class="hljs language-bash" style="margin:15px 0px;padding:10px;white-space:pre;max-width:100%;max-height:600px;color:rgb(171,178,191);background:rgb(40,44,52);line-height:19.5px;"></code></pre><code class="hljs language-bash" style="margin:15px 0px;padding:10px;white-space:pre;max-width:100%;max-height:600px;color:rgb(171,178,191);background:rgb(40,44,52);line-height:19.5px;"><span class="hljs-comment" style="color:rgb(92,99,112);font-style:italic;"># SSL 인증서 파일 디렉토리로 이동</span>$ <span class="hljs-built_in" style="color:rgb(230,192,123);">cd</span> /etc/httpd/ssl <span class="hljs-comment" style="color:rgb(92,99,112);font-style:italic;"># 키 파일 백업</span>$ <span class="hljs-built_in" style="color:rgb(230,192,123);">cp</span> playground.key playground.key.bak <span class="hljs-comment" style="color:rgb(92,99,112);font-style:italic;"># 키 비밀번호 제거</span>$ openssl rsa -<span class="hljs-keyword" style="color:rgb(198,120,221);">in</span> playground.key -out playground.keyEnter pass phrase <span class="hljs-keyword" style="color:rgb(198,120,221);">for</span> playground.key:writing RSA key</code><p><code class="hljs language-bash" style="margin:15px 0px;padding:10px;white-space:pre;max-width:100%;max-height:600px;color:rgb(171,178,191);background:rgb(40,44,52);line-height:19.5px;"><br /></code></p><code class="hljs language-bash" style="margin:15px 0px;padding:10px;white-space:pre;max-width:100%;max-height:600px;color:rgb(171,178,191);background:rgb(40,44,52);line-height:19.5px;"></code><p><code class="hljs language-bash" style="margin:15px 0px;padding:10px;white-space:pre;max-width:100%;max-height:600px;color:rgb(171,178,191);background:rgb(40,44,52);line-height:19.5px;"><code class="hljs language-bash" style="margin:15px 0px;padding:10px;white-space:pre;max-width:100%;max-height:600px;color:rgb(171,178,191);background:rgb(40,44,52);line-height:19.5px;"> </code></code></p><code class="hljs language-bash" style="margin:15px 0px;padding:10px;white-space:pre;max-width:100%;max-height:600px;color:rgb(171,178,191);background:rgb(40,44,52);line-height:19.5px;"></code><p style="margin:0px 0px 20px;font-size:0.9375em;line-height:2;color:rgb(85,85,85);font-family:AppleSDGothicNeo, 'Noto Sans KR', sans-serif;"> </p><pre class="bash" style="margin:0px;padding:0px;white-space:pre-wrap;color:rgb(85,85,85);"><code class="hljs language-bash" style="margin:15px 0px;padding:10px;white-space:pre;max-width:100%;max-height:600px;color:rgb(171,178,191);background:rgb(40,44,52);line-height:19.5px;"></code></pre><code class="hljs language-bash" style="margin:15px 0px;padding:10px;white-space:pre;max-width:100%;max-height:600px;color:rgb(171,178,191);background:rgb(40,44,52);line-height:19.5px;"><span class="hljs-comment" style="color:rgb(92,99,112);font-style:italic;"># Apache 재시작</span>$ service httpd restartRedirecting to /bin/systemctl restart httpd.service</code><p><code class="hljs language-bash" style="margin:15px 0px;padding:10px;white-space:pre;max-width:100%;max-height:600px;color:rgb(171,178,191);background:rgb(40,44,52);line-height:19.5px;"><br /></code></p><code class="hljs language-bash" style="margin:15px 0px;padding:10px;white-space:pre;max-width:100%;max-height:600px;color:rgb(171,178,191);background:rgb(40,44,52);line-height:19.5px;"></code><p><code class="hljs language-bash" style="margin:15px 0px;padding:10px;white-space:pre;max-width:100%;max-height:600px;color:rgb(171,178,191);background:rgb(40,44,52);line-height:19.5px;"><code class="hljs language-bash" style="margin:15px 0px;padding:10px;white-space:pre;max-width:100%;max-height:600px;color:rgb(171,178,191);background:rgb(40,44,52);line-height:19.5px;"> </code></code></p><code class="hljs language-bash" style="margin:15px 0px;padding:10px;white-space:pre;max-width:100%;max-height:600px;color:rgb(171,178,191);background:rgb(40,44,52);line-height:19.5px;"></code><p style="margin:0px 0px 20px;font-size:0.9375em;line-height:2;color:rgb(85,85,85);font-family:AppleSDGothicNeo, 'Noto Sans KR', sans-serif;">Apache 재시작 시 비밀번호를 물어보지 않는다.</p>]]></description>
<dc:creator>최고관리자</dc:creator>
<dc:date>2026-06-24T10:57:29+09:00</dc:date>
</item>


<item>
<title>[Linux] OS별 network 재시작 방법</title>
<link>https://blog.uidc.co.kr/ubuntu/linux-os%EB%B3%84-network-%EC%9E%AC%EC%8B%9C%EC%9E%91-%EB%B0%A9%EB%B2%95/</link>
<description><![CDATA[<h3 style="font-size:20px;margin-bottom:24px;font-weight:normal;line-height:1.4;color:rgb(51,51,51);font-family:'Noto Sans KR', Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', '맑은 고딕', 'Nanum Gothic', Dotum, '돋움', Helvetica, sans-serif;">CentOS 6/ RHEL7/</h3><p style="margin-bottom:28px;font-size:medium;line-height:26px;color:rgb(85,85,85);font-family:'Noto Sans KR', Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', '맑은 고딕', 'Nanum Gothic', Dotum, '돋움', Helvetica, sans-serif;">service network  restart</p><h3 style="font-size:20px;margin-bottom:24px;font-weight:normal;line-height:1.4;color:rgb(51,51,51);font-family:'Noto Sans KR', Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', '맑은 고딕', 'Nanum Gothic', Dotum, '돋움', Helvetica, sans-serif;">CentOS 8</h3><p style="margin-bottom:28px;font-size:medium;line-height:26px;color:rgb(85,85,85);font-family:'Noto Sans KR', Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', '맑은 고딕', 'Nanum Gothic', Dotum, '돋움', Helvetica, sans-serif;">$sudo nmcli networking off<br />$sudo nmcli networking on</p><p style="margin-bottom:28px;font-size:medium;line-height:26px;color:rgb(85,85,85);font-family:'Noto Sans KR', Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', '맑은 고딕', 'Nanum Gothic', Dotum, '돋움', Helvetica, sans-serif;"> </p><p style="margin-bottom:28px;font-size:medium;line-height:26px;color:rgb(85,85,85);font-family:'Noto Sans KR', Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', '맑은 고딕', 'Nanum Gothic', Dotum, '돋움', Helvetica, sans-serif;">또는 </p><p style="margin-bottom:28px;font-size:medium;line-height:26px;color:rgb(85,85,85);font-family:'Noto Sans KR', Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', '맑은 고딕', 'Nanum Gothic', Dotum, '돋움', Helvetica, sans-serif;"> </p><p style="margin-bottom:28px;font-size:medium;line-height:26px;color:rgb(85,85,85);font-family:'Noto Sans KR', Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', '맑은 고딕', 'Nanum Gothic', Dotum, '돋움', Helvetica, sans-serif;">$sudo systemctl restart NetworkManager.service</p><h3 style="font-size:20px;margin-bottom:24px;font-weight:normal;line-height:1.4;color:rgb(51,51,51);font-family:'Noto Sans KR', Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', '맑은 고딕', 'Nanum Gothic', Dotum, '돋움', Helvetica, sans-serif;">Ubuntu 14</h3><p style="margin-bottom:28px;font-size:medium;line-height:26px;color:rgb(85,85,85);font-family:'Noto Sans KR', Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', '맑은 고딕', 'Nanum Gothic', Dotum, '돋움', Helvetica, sans-serif;"><span style="color:rgb(17,17,17);">How to restart network in Ubuntu Server:</span></p><ol style="margin:0px 0px 32px;padding:0px 0px 0px 19px;color:rgb(51,51,51);font-family:'Noto Sans KR', Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', '맑은 고딕', 'Nanum Gothic', Dotum, '돋움', Helvetica, sans-serif;font-size:medium;list-style-type:disc;"><li style="margin-bottom:6px;font-size:16px;line-height:1.75;color:rgba(0,0,0,0.87);">/etc/init.d/networking restart<span> </span>script based command.</li><li style="margin-bottom:6px;font-size:16px;line-height:1.75;color:rgba(0,0,0,0.87);">service restart networking<span> </span>– Use service to run a System V init script such as networking.</li><li style="margin-bottom:6px;font-size:16px;line-height:1.75;color:rgba(0,0,0,0.87);">systemctl restart networking<span> </span>– Restart networking for the latest version of Ubuntu server.</li></ol><h3 style="font-size:20px;margin-bottom:24px;font-weight:normal;line-height:1.4;color:rgb(51,51,51);font-family:'Noto Sans KR', Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', '맑은 고딕', 'Nanum Gothic', Dotum, '돋움', Helvetica, sans-serif;">Ubuntu 18 / 20 / 22 IP설정</h3><p style="margin-bottom:28px;font-size:medium;line-height:26px;color:rgb(85,85,85);font-family:'Noto Sans KR', Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', '맑은 고딕', 'Nanum Gothic', Dotum, '돋움', Helvetica, sans-serif;">/etc/netplan/00-installer-config.yaml 파일 수정</p><p style="margin-bottom:28px;font-size:medium;line-height:26px;color:rgb(85,85,85);font-family:'Noto Sans KR', Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', '맑은 고딕', 'Nanum Gothic', Dotum, '돋움', Helvetica, sans-serif;">$ sudo netplan apply</p><h3 style="font-size:20px;margin-bottom:24px;font-weight:normal;line-height:1.4;color:rgb(51,51,51);font-family:'Noto Sans KR', Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', '맑은 고딕', 'Nanum Gothic', Dotum, '돋움', Helvetica, sans-serif;">Almalinux</h3><p style="margin-bottom:28px;font-size:medium;line-height:26px;color:rgb(85,85,85);font-family:'Noto Sans KR', Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', '맑은 고딕', 'Nanum Gothic', Dotum, '돋움', Helvetica, sans-serif;">#nmtui</p><p style="margin-bottom:28px;font-size:medium;line-height:26px;color:rgb(85,85,85);font-family:'Noto Sans KR', Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', '맑은 고딕', 'Nanum Gothic', Dotum, '돋움', Helvetica, sans-serif;"><a href="https://linuxconfig.org/how-to-configure-static-ip-address-on-almalinux" target="_blank" style="color:rgb(61,98,206);" rel="nofollow noreferrer noopener">https://linuxconfig.org/how-to-configure-static-ip-address-on-almalinux </a></p><h3 style="font-size:20px;margin-bottom:24px;font-weight:normal;line-height:1.4;color:rgb(51,51,51);font-family:'Noto Sans KR', Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', '맑은 고딕', 'Nanum Gothic', Dotum, '돋움', Helvetica, sans-serif;">debian 9</h3><p style="font-size:1.12em;margin-bottom:28px;font-weight:bold;line-height:26px;color:rgb(85,85,85);font-family:'Noto Sans KR', Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', '맑은 고딕', 'Nanum Gothic', Dotum, '돋움', Helvetica, sans-serif;">파일</p><p style="margin-bottom:28px;font-size:medium;line-height:26px;color:rgb(85,85,85);font-family:'Noto Sans KR', Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', '맑은 고딕', 'Nanum Gothic', Dotum, '돋움', Helvetica, sans-serif;">sudo nano /etc/network/interfaces</p><p style="font-size:1.12em;margin-bottom:28px;font-weight:bold;line-height:26px;color:rgb(85,85,85);font-family:'Noto Sans KR', Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', '맑은 고딕', 'Nanum Gothic', Dotum, '돋움', Helvetica, sans-serif;">수정</p><p style="margin-bottom:28px;font-size:medium;line-height:26px;color:rgb(85,85,85);font-family:'Noto Sans KR', Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', '맑은 고딕', 'Nanum Gothic', Dotum, '돋움', Helvetica, sans-serif;">auto eth0<br />iface eth0 inet static<br />    address 192.168.1.100<br />    netmask 255.255.255.0<br />    gateway 192.168.1.1</p><p style="font-size:1.12em;margin-bottom:28px;font-weight:bold;line-height:26px;color:rgb(85,85,85);font-family:'Noto Sans KR', Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', '맑은 고딕', 'Nanum Gothic', Dotum, '돋움', Helvetica, sans-serif;">재 시작</p><p style="font-size:1.12em;margin-bottom:28px;font-weight:bold;line-height:26px;color:rgb(85,85,85);font-family:'Noto Sans KR', Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', '맑은 고딕', 'Nanum Gothic', Dotum, '돋움', Helvetica, sans-serif;">sudo systemctl restart networking</p>]]></description>
<dc:creator>최고관리자</dc:creator>
<dc:date>2025-07-22T12:12:55+09:00</dc:date>
</item>


<item>
<title>웹 서버의 정보 숨기기 (apache)</title>
<link>https://blog.uidc.co.kr/ubuntu/%EC%9B%B9-%EC%84%9C%EB%B2%84%EC%9D%98-%EC%A0%95%EB%B3%B4-%EC%88%A8%EA%B8%B0%EA%B8%B0-apache/</link>
<description><![CDATA[<pre></pre><p><span style="font-family:'AppleSDGothicNeo-Regular', 'Malgun Gothic', '맑은 고딕', dotum, '돋움', sans-serif;">curl, nc, httprint 등으로 서버의 정보를 수집하는 방법은 다양하다. 도메인이나 ip주소를 입력하면 해당 서버의 OS, 웹서버, 네임서버 등의 정보를 정리하여 보여주는 사이트들도 많다. curl을 이용해서 테스트 서버의 정보를 보면서 웹서버의 정보를 숨기는 작업에 대해서 정리하고자 한다.</span></p>
<pre class="html xml"><code class="hljs xml">[root@webpress /]# curl -i 1.234.56.789
HTTP/1.1 200 OK
Date: Wed, 21 Apr 2021 05:00:24 GMT
Server: Apache/2.4.6 (CentOS) PHP/7.4.16
Last-Modified: Thu, 25 Mar 2021 04:58:54 GMT
ETag: "0-5be5545af6651"
Accept-Ranges: bytes
Content-Length: 0
Content-Type: text/html; charset=UTF-8

[root@webpress /]#
</code></pre>
<p> </p>
<p><span style="font-family:'AppleSDGothicNeo-Regular', 'Malgun Gothic', '맑은 고딕', dotum, '돋움', sans-serif;">위의 예에서 사용한 ip주소는 존재할 수 없는 주소이지만 그 아래의 결과는 실제 서버의 헤더정보이다. </span></p>
<p><span style="font-family:'AppleSDGothicNeo-Regular', 'Malgun Gothic', '맑은 고딕', dotum, '돋움', sans-serif;">Server OS : CentOS / 웹서버 : Apache 2.4.6 / PHP : 7.4.16 이라는 것을 쉽게 알 수 있다.</span></p>
<p><span style="font-family:'AppleSDGothicNeo-Regular', 'Malgun Gothic', '맑은 고딕', dotum, '돋움', sans-serif;">아래 두 줄을 httpd의 설정 파일인 httpd.conf 에 추가해보자. 위치는 어디든 상관없다.</span></p>
<pre class="html xml"><code class="hljs xml">ServerTokens Prod
ServerSignature Off
</code></pre>
<p> </p>
<p><span style="font-family:'AppleSDGothicNeo-Regular', 'Malgun Gothic', '맑은 고딕', dotum, '돋움', sans-serif;">이제 웹서버를 재시동 한 후에 다시 확인해보면 아래와 같이 나온다.</span></p>
<pre class="html xml"><code class="hljs xml">[root@webpress /]# curl -i 1.234.56.789
HTTP/1.1 200 OK
Date: Wed, 21 Apr 2021 05:22:25 GMT
Server: Apache
Last-Modified: Thu, 25 Mar 2021 04:58:54 GMT
ETag: "0-5be5545af6651"
Accept-Ranges: bytes
Content-Length: 0
Content-Type: text/html; charset=UTF-8

[root@webpress /]#
</code></pre>
<p> </p>
<p><span style="font-family:'AppleSDGothicNeo-Regular', 'Malgun Gothic', '맑은 고딕', dotum, '돋움', sans-serif;"><b>ServerTokens</b>는 서버가 클라이언트에 응답하는 헤더의 필드에 포함되는 모듈에 대한 정보를 제어한다. 이 구문을 생략하면 (apache 2.4.x에는 생략되어 있다) Full 옵션을 준것과 동일한데 이는 모든 정보(?)를 다 제공한다. 가장 제한적인 옵션이 Prod이며 웹서버의 종류(이름)만 전송한다. 이 외에 Major, Minor, Min, OS 등의 옵션이 있는데 자세한 것은 <span style="color:#ffffff;background-color:#006dd7;"><a style="color:rgb(255,255,255);" href="https://httpd.apache.org/docs/2.4/mod/core.html#servertokens" target="_blank" rel="nofollow noreferrer noopener">아파치 문서</a></span>를 참고하자.</span></p>
<p><span style="font-family:'AppleSDGothicNeo-Regular', 'Malgun Gothic', '맑은 고딕', dotum, '돋움', sans-serif;"><b>ServerSignature</b>는 웹사이트의 오류페이지나 ftp의 디렉토리 목록 등에서 페이지의 하단에 출력되는 글을 설정하는데에 사용된다. 기본값이 off이기 때문에 생략해도 무방하다. 이 구문에 의해서 출력되는 서버의 버전정보 등은 ServerTokens에 의해서 제어된다.</span></p>]]></description>
<dc:creator>최고관리자</dc:creator>
<dc:date>2025-03-25T11:02:04+09:00</dc:date>
</item>


<item>
<title>[Apache] 취약한 HTTP Method 제한 (httpd.conf)</title>
<link>https://blog.uidc.co.kr/ubuntu/apache-%EC%B7%A8%EC%95%BD%ED%95%9C-http-method-%EC%A0%9C%ED%95%9C-httpdconf/</link>
<description><![CDATA[<div class="tt_article_useless_p_margin contents_style" style="color:rgb(85,85,85);font-family:'Malgun Gothic', '맑은 고딕', '굴림', gulim, '돋움', dotum, 'Microsoft NeoGothic', 'Droid sans', sans-serif;font-size:14px;letter-spacing:-0.5px;background-color:rgb(255,255,255);"><div class="txc-textbox" style="border-style:solid;font-weight:bold;border-width:1px 1px 1px 5px;border-color:rgb(112,112,112);padding:10px;"><p>목차</p><ul style="padding-left:20px;margin-bottom:0px;"><li style="list-style-type:disc;margin-bottom:10px;font-size:20px;padding-left:0px;color:rgb(0,0,0);"><a href="https://veneas.tistory.com/entry/Apache-%EC%B7%A8%EC%95%BD%ED%95%9C-HTTP-Method-%EC%A0%9C%ED%95%9C-httpdconf#1._HTTP_Request_Method" style="background-color:transparent;color:rgb(0,0,0);" rel="nofollow">1. HTTP Request Method</a></li><li style="list-style-type:disc;margin-bottom:10px;font-size:20px;padding-left:0px;color:rgb(0,0,0);"><a href="https://veneas.tistory.com/entry/Apache-%EC%B7%A8%EC%95%BD%ED%95%9C-HTTP-Method-%EC%A0%9C%ED%95%9C-httpdconf#2._%EC%A0%9C%ED%95%9C_Method_%EC%A0%95%EC%9D%98" style="background-color:transparent;color:rgb(0,0,0);" rel="nofollow">2. 제한 Method 정의</a></li><li style="list-style-type:disc;margin-bottom:10px;font-size:20px;padding-left:0px;color:rgb(0,0,0);"><a href="https://veneas.tistory.com/entry/Apache-%EC%B7%A8%EC%95%BD%ED%95%9C-HTTP-Method-%EC%A0%9C%ED%95%9C-httpdconf#3._%EC%A0%9C%ED%95%9C_%EC%A0%9C%EC%99%B8_Method_%EC%A0%95%EC%9D%98" style="background-color:transparent;color:rgb(0,0,0);" rel="nofollow">3. 제한 제외 Method 정의</a></li><li style="list-style-type:disc;margin-bottom:10px;font-size:20px;padding-left:0px;color:rgb(0,0,0);"><a href="https://veneas.tistory.com/entry/Apache-%EC%B7%A8%EC%95%BD%ED%95%9C-HTTP-Method-%EC%A0%9C%ED%95%9C-httpdconf#4._Curl_HTTP_Method_%EC%A0%90%EA%B2%80" style="background-color:transparent;color:rgb(0,0,0);" rel="nofollow">4. Curl HTTP Method 점검</a></li></ul></div><h2 style="font-size:1.62em;margin:30px 0px 20px;padding:3px 0px 10px 10px;border-left:12px solid rgb(81,113,53);border-bottom:1px solid rgb(81,113,53);font-weight:normal;">1. HTTP Request Method</h2><ul style="padding-left:20px;"><li style="list-style-type:disc;margin-bottom:5px;"><span style="font-weight:700;">GET</span>: 클라이언트가 서버에게 URL에 해당하는 자료의 전송을 요청</li><li style="list-style-type:disc;margin-bottom:5px;"><span style="font-weight:700;">HEAD</span>: GET 요청으로 반환될 데이터 중 <span style="font-weight:700;">헤더 부분에 해당하는 데이터만</span> 요청(바디 제외)</li><li style="list-style-type:disc;margin-bottom:5px;"><span style="font-weight:700;">POST</span>: 클라이언트가 서버에서 처리할 수 있는 <span style="font-weight:700;">자료를 보냄</span></li><li style="list-style-type:disc;margin-bottom:5px;"><span style="font-weight:700;">PUT</span>: 클라이언트가 서버에게 지정한 URL에 지정한 데이터를 <span style="font-weight:700;">저장</span>할 것을 요청</li><li style="list-style-type:disc;margin-bottom:5px;"><span style="font-weight:700;">DELETE</span>: 클라이언트가 서버에게 지정한 URL의 정보를 <span style="font-weight:700;">제거</span>할 것을 요청</li><li style="list-style-type:disc;margin-bottom:5px;"><span style="font-weight:700;">CONNECT</span>: 클라이언트가 특정 종류의 프록시 서버에게 <span style="font-weight:700;">연결</span>을 요청</li><li style="list-style-type:disc;margin-bottom:5px;"><span style="font-weight:700;">OPTIONS</span>: 해당 URL에서 <span style="font-weight:700;">지원하는 요청 메세지의 목록</span>을 요청(허용된 Method 확인)</li><li style="list-style-type:disc;margin-bottom:5px;"><span style="font-weight:700;">TRACE</span>: 클라이언트가 서버에게 송신한 요청의 내용을 <span style="font-weight:700;">반환</span>해 줄 것을 요청</li><li style="list-style-type:disc;margin-bottom:5px;"><span style="font-weight:700;">PATCH</span>: 클라이언트가 서버에게 지정한 URL의 데이터를 <span style="font-weight:700;">부분적으로 수정</span>할 것을 요청</li></ul><h2 style="font-size:1.62em;margin:30px 0px 20px;padding:3px 0px 10px 10px;border-left:12px solid rgb(81,113,53);border-bottom:1px solid rgb(81,113,53);font-weight:normal;">2. 제한 Method 정의</h2><p style="font-size:1.12em;"><span style="font-weight:700;">Method 모두 열고 특정 Method를 제한하는 방식입니다.</span></p><p style="font-size:1.12em;"><span style="font-weight:700;">이 방식은 Method 제한이 잘 안 될 수도 있으므로 LimitExcept를 이용하는 것을 추천합니다.</span></p><p> </p><p style="font-size:1.12em;"><span style="color:rgb(248,144,9);"><span style="font-weight:700;">1.</span></span> httpd.conf 파일 백업하기(백업을 생활화합니다.)</p><p>일반적으로 파일 경로는 /etc/httpd/conf 에 설정 httpd.conf 파일이 존재합니다. (CentOS7)</p><pre class="shell" style="font-family:Menlo, Monaco, Consolas, 'Courier New', monospace;font-size:1em;"><code class="hljs" style="font-family:Menlo, Monaco, Consolas, 'Courier New', monospace;font-size:15px;padding:0.5em;color:rgb(171,178,191);background:rgb(40,44,52);"><span class="hljs-meta" style="color:rgb(97,174,238);">#</span><span class="bash"> cp httpd.conf httpd.conf.backup</span>
<span class="hljs-meta" style="color:rgb(97,174,238);">
#</span><span class="bash"> ll</span>
합계 40
-rw-r--r--. 1 root root 12003 11월 15 16:49 httpd.conf
-rw-r--r--. 1 root root 12003 11월 15 16:53 httpd.conf.backup
-rw-r--r--. 1 root root 13064 11월 17  2020 magic</code></pre><p style="font-size:1.12em;"> </p><p style="font-size:1.12em;"><span style="color:rgb(248,144,9);"><span style="font-weight:700;">2.</span></span> vi or vim 이용해 httpd.conf 파일을 수정합니다.</p><ul style="padding-left:20px;"><li style="list-style-type:disc;margin-bottom:5px;">설정이 필요한 Directory에 Limit을 이용해 막고자 하는 HTTP Method를 입력합니다.</li></ul><pre class="shell" style="font-family:Menlo, Monaco, Consolas, 'Courier New', monospace;font-size:1em;"><code class="hljs" style="font-family:Menlo, Monaco, Consolas, 'Courier New', monospace;font-size:15px;padding:0.5em;color:rgb(171,178,191);background:rgb(40,44,52);">&lt;Directory /&gt;
	&lt;Limit DELETE OPTIONS&gt;
		Order allow,deny
		Allow from all
	&lt;/Limit&gt;
&lt;/Directory&gt;</code></pre><p> </p><ul style="padding-left:20px;"><li style="list-style-type:disc;margin-bottom:5px;">TRACE 메소드를 막고 싶은 경우 httpd.conf 파일 맨 밑에 다음과 같이 작성합니다.</li></ul><pre class="shell" style="font-family:Menlo, Monaco, Consolas, 'Courier New', monospace;font-size:1em;"><code class="hljs" style="font-family:Menlo, Monaco, Consolas, 'Courier New', monospace;font-size:15px;padding:0.5em;color:rgb(171,178,191);background:rgb(40,44,52);">TraceEnable Off</code></pre><p style="font-size:1.12em;"> </p><p style="font-size:1.12em;"><span style="color:rgb(248,144,9);"><span style="font-weight:700;">3.</span></span> 아파치 재시작</p><pre class="shell" style="font-family:Menlo, Monaco, Consolas, 'Courier New', monospace;font-size:1em;"><code class="hljs" style="font-family:Menlo, Monaco, Consolas, 'Courier New', monospace;font-size:15px;padding:0.5em;color:rgb(171,178,191);background:rgb(40,44,52);"><span class="hljs-meta" style="color:rgb(97,174,238);">#</span><span class="bash"> systemctl restart httpd</span></code></pre><h2 style="font-size:1.62em;margin:30px 0px 20px;padding:3px 0px 10px 10px;border-left:12px solid rgb(81,113,53);border-bottom:1px solid rgb(81,113,53);font-weight:normal;">3. 제한 제외 Method 정의</h2><p style="font-size:1.12em;"><span style="font-weight:700;">Method 모두 막고 특정 Method를 허용하는 방식입니다.</span></p><p> </p><p style="font-size:1.12em;"><span style="color:rgb(248,144,9);"><span style="font-weight:700;">1.</span></span> httpd.conf 파일 백업하기(백업을 생활화합니다.)</p><p>일반적으로 파일 경로는 /etc/httpd/conf 에 설정 httpd.conf 파일이 존재합니다. (CentOS7)</p><pre class="angelscript" style="font-family:Menlo, Monaco, Consolas, 'Courier New', monospace;font-size:1em;"><code class="hljs diff" style="font-family:Menlo, Monaco, Consolas, 'Courier New', monospace;font-size:15px;padding:0.5em;color:rgb(171,178,191);background:rgb(40,44,52);"># cp httpd.conf httpd.conf.backup

# ll
합계 40
<span class="hljs-deletion" style="color:rgb(224,108,117);">-rw-r--r--. 1 root root 12003 11월 15 16:49 httpd.conf</span>
<span class="hljs-deletion" style="color:rgb(224,108,117);">-rw-r--r--. 1 root root 12003 11월 15 16:53 httpd.conf.backup</span>
<span class="hljs-deletion" style="color:rgb(224,108,117);">-rw-r--r--. 1 root root 13064 11월 17  2020 magic</span></code></pre><p style="font-size:1.12em;"> </p><p style="font-size:1.12em;"><span style="color:rgb(248,144,9);"><span style="font-weight:700;">2.</span></span> vi or vim 이용해 httpd.conf 파일을 수정합니다.</p><ul style="padding-left:20px;"><li style="list-style-type:disc;margin-bottom:5px;">설정이 필요한 Directory에 LimitExcept을 이용해 제한하고자 하는 HTTP Method를 입력합니다.</li></ul><pre class="shell" style="font-family:Menlo, Monaco, Consolas, 'Courier New', monospace;font-size:1em;"><code class="hljs" style="font-family:Menlo, Monaco, Consolas, 'Courier New', monospace;font-size:15px;padding:0.5em;color:rgb(171,178,191);background:rgb(40,44,52);">&lt;Directory /&gt;
	&lt;LimitExcept GET POST&gt;
		Order deny,allow
		Deny from all
	&lt;/LimitExcept&gt;
&lt;/Directory&gt;</code></pre><p> </p><ul style="padding-left:20px;"><li style="list-style-type:disc;margin-bottom:5px;">TRACE 메소드를 막고 싶은 경우 httpd.conf 파일 맨 밑에 다음과 같이 작성합니다.</li></ul><pre class="apache" style="font-family:Menlo, Monaco, Consolas, 'Courier New', monospace;font-size:1em;"><code class="hljs" style="font-family:Menlo, Monaco, Consolas, 'Courier New', monospace;font-size:15px;padding:0.5em;color:rgb(171,178,191);background:rgb(40,44,52);"><span class="hljs-attribute" style="color:rgb(152,195,121);">TraceEnable</span> <span class="hljs-literal" style="color:rgb(86,182,194);">Off</span></code></pre><p style="font-size:1.12em;"> </p><p style="font-size:1.12em;"><span style="color:rgb(248,144,9);"><span style="font-weight:700;">3.</span></span> 아파치 재시작</p><pre class="vala" style="font-family:Menlo, Monaco, Consolas, 'Courier New', monospace;font-size:1em;"><code class="hljs apache" style="font-family:Menlo, Monaco, Consolas, 'Courier New', monospace;font-size:15px;padding:0.5em;color:rgb(171,178,191);background:rgb(40,44,52);"><span class="hljs-comment" style="color:rgb(177,142,177);font-style:italic;"># systemctl restart httpd</span></code></pre><h2 style="font-size:1.62em;margin:30px 0px 20px;padding:3px 0px 10px 10px;border-left:12px solid rgb(81,113,53);border-bottom:1px solid rgb(81,113,53);font-weight:normal;">4. Curl HTTP Method 점검</h2><p style="font-size:1.12em;"><span style="color:rgb(248,144,9);"><span style="font-weight:700;">1.</span></span> 현재 허용된 Method 확인(OPTIONS 허용된 경우)</p><p>&lt; Allow: POST, OPTIONS, GET, HEAD, TRACE를 보면 허용된 메소드를 확인할 수 있습니다.</p><pre class="shell" style="font-family:Menlo, Monaco, Consolas, 'Courier New', monospace;font-size:1em;"><code class="hljs" style="font-family:Menlo, Monaco, Consolas, 'Courier New', monospace;font-size:15px;padding:0.5em;color:rgb(171,178,191);background:rgb(40,44,52);"><span class="hljs-meta" style="color:rgb(97,174,238);">#</span><span class="bash"> curl -v -X OPTIONS localhost</span>

* About to connect() to localhost port 80 (#0)
*   Trying ::1...
* Connected to localhost (::1) port 80 (#0)
<span class="hljs-meta" style="color:rgb(97,174,238);">&gt;</span><span class="bash"> OPTIONS / HTTP/1.1</span>
<span class="hljs-meta" style="color:rgb(97,174,238);">&gt;</span><span class="bash"> User-Agent: curl/7.29.0</span>
<span class="hljs-meta" style="color:rgb(97,174,238);">&gt;</span><span class="bash"> Host: localhost</span>
<span class="hljs-meta" style="color:rgb(97,174,238);">&gt;</span><span class="bash"> Accept: */*</span>
<span class="hljs-meta" style="color:rgb(97,174,238);">&gt;</span><span class="bash">
&lt; HTTP/1.1 200 OK</span>
&lt; Date: Mon, 15 Nov 2021 07:57:28 GMT
&lt; Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips
&lt; Allow: POST,OPTIONS,GET,HEAD,TRACE
&lt; Content-Length: 0
&lt; Content-Type: httpd/unix-directory
&lt;
* Connection #0 to host localhost left intact</code></pre><p style="font-size:1.12em;"> </p><p style="font-size:1.12em;"><span style="color:rgb(248,144,9);"><span style="font-weight:700;">2.</span></span> HEAD Method 확인</p><pre class="shell" style="font-family:Menlo, Monaco, Consolas, 'Courier New', monospace;font-size:1em;"><code class="hljs" style="font-family:Menlo, Monaco, Consolas, 'Courier New', monospace;font-size:15px;padding:0.5em;color:rgb(171,178,191);background:rgb(40,44,52);"><span class="hljs-meta" style="color:rgb(97,174,238);">#</span><span class="bash"> curl -I localhost</span>

HTTP/1.1 403 Forbidden
Date: Mon, 15 Nov 2021 08:19:04 GMT
Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips
Last-Modified: Thu, 16 Oct 2014 13:20:58 GMT
ETag: "1321-5058a1e728280"
Accept-Ranges: bytes
Content-Length: 4897
Content-Type: text/html; charset=UTF-8</code></pre><p style="font-size:1.12em;"> </p><p style="font-size:1.12em;"><span style="color:rgb(248,144,9);"><span style="font-weight:700;">3.</span></span> Http Method 확인</p><p style="font-size:1.12em;"> </p><div class="txc-textbox" style="background-color:rgb(248,248,248);border:1px solid rgb(235,235,235);padding:10px;"><p style="font-size:1.12em;"><span style="font-weight:700;">[curl 옵션]</span></p><p>-<span style="font-weight:700;">X</span> : HTTP 메서드를 설정할 수 있다.<br />-<span style="font-weight:700;">I</span> : 헤더 요청만 받는다.<br />-<span style="font-weight:700;">v</span> : 자세하게 출력한다.</p></div><p> </p><pre class="shell" style="font-family:Menlo, Monaco, Consolas, 'Courier New', monospace;font-size:1em;"><code class="hljs" style="font-family:Menlo, Monaco, Consolas, 'Courier New', monospace;font-size:15px;padding:0.5em;color:rgb(171,178,191);background:rgb(40,44,52);"><span class="hljs-meta" style="color:rgb(97,174,238);">#</span><span class="bash"> curl -v -X OPTIONS localhost</span>

* About to connect() to localhost port 80 (#0)
*   Trying ::1...
* Connected to localhost (::1) port 80 (#0)
<span class="hljs-meta" style="color:rgb(97,174,238);">&gt;</span><span class="bash"> OPTIONS / HTTP/1.1</span>
<span class="hljs-meta" style="color:rgb(97,174,238);">&gt;</span><span class="bash"> User-Agent: curl/7.29.0</span>
<span class="hljs-meta" style="color:rgb(97,174,238);">&gt;</span><span class="bash"> Host: localhost</span>
<span class="hljs-meta" style="color:rgb(97,174,238);">&gt;</span><span class="bash"> Accept: */*</span>
<span class="hljs-meta" style="color:rgb(97,174,238);">&gt;</span><span class="bash">
&lt; HTTP/1.1 403 Forbidden</span>
&lt; Date: Mon, 15 Nov 2021 08:32:01 GMT
&lt; Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips
&lt; Last-Modified: Thu, 16 Oct 2014 13:20:58 GMT
&lt; ETag: "1321-5058a1e728280"
&lt; Accept-Ranges: bytes
&lt; Content-Length: 4897
&lt; Content-Type: text/html; charset=UTF-8
&lt;
&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"&gt;&lt;html&gt;&lt;head&gt;
&lt;meta http-equiv="content-type" content="text/html; charset=UTF-8"&gt;
                &lt;title&gt;Apache HTTP Server Test Page powered by CentOS&lt;/title&gt;
                &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt;

( ... ) 생략</code></pre><p> ****</p><pre></pre><p>추가</p>
<p>TRACE메소드를 제한하기 위해서 Apache 2.0.55 이후 버전부터 httpd.conf파일 안에 추가 명령어 필요</p>
<p>TraceEnable Off (명령어가 On으로 되어있다면 수정)</p>
<p>****</p><pre class="shell" style="font-family:Menlo, Monaco, Consolas, 'Courier New', monospace;font-size:1em;"><code class="hljs" style="font-family:Menlo, Monaco, Consolas, 'Courier New', monospace;font-size:15px;padding:0.5em;color:rgb(171,178,191);background:rgb(40,44,52);"><span class="hljs-meta" style="color:rgb(97,174,238);">#</span><span class="bash"> curl -I -X OPTIONS localhost</span>

HTTP/1.1 403 Forbidden
Date: Mon, 15 Nov 2021 08:32:38 GMT
Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips
Last-Modified: Thu, 16 Oct 2014 13:20:58 GMT
ETag: "1321-5058a1e728280"
Accept-Ranges: bytes
Content-Length: 4897
Content-Type: text/html; charset=UTF-8</code></pre></div>]]></description>
<dc:creator>최고관리자</dc:creator>
<dc:date>2025-03-25T10:32:40+09:00</dc:date>
</item>


<item>
<title>우분투 컴퓨터 이름 hostname 변경 하기</title>
<link>https://blog.uidc.co.kr/ubuntu/%EC%9A%B0%EB%B6%84%ED%88%AC-%EC%BB%B4%ED%93%A8%ED%84%B0-%EC%9D%B4%EB%A6%84-hostname-%EB%B3%80%EA%B2%BD-%ED%95%98%EA%B8%B0/</link>
<description><![CDATA[<div class="tt_article_useless_p_margin contents_style" style="margin:0px;padding:0px;color:rgb(85,85,85);font-family:AppleSDGothicNeo, 'Noto Sans KR', sans-serif;font-size:16px;"><h3 style="font-size:1.3125em;margin:29px 0px 22px;padding:0px;clear:both;line-height:1.5;color:rgb(0,0,0);font-weight:normal;"><b>1. /etc 로 이동</b></h3><span><img src="https://blog.kakaocdn.net/dn/mAJgA/btqNSzV2K0h/Ypuu6DMrK68p7ZfskrBnc1/img.png" width="365" style="border:none;vertical-align:top;margin:0px;height:auto;" alt="img.png" /></span><h4 style="font-size:1.125em;margin:29px 0px 22px;padding:0px;clear:both;font-weight:normal;line-height:1.5;color:rgb(0,0,0);"><span style="background-color:rgb(246,225,153);">$ cd /etc</span></h4><h3 style="font-size:1.3125em;margin:29px 0px 22px;padding:0px;clear:both;line-height:1.5;color:rgb(0,0,0);font-weight:normal;"><b>2. hostname 파일 열기</b></h3><span><img src="https://blog.kakaocdn.net/dn/Tj8CC/btqNSz2I7oT/9FaKcWIobBRLG53zKCG5AK/img.png" width="456" style="border:none;vertical-align:top;margin:0px;height:auto;" alt="img.png" /></span><h4 style="font-size:1.125em;margin:29px 0px 22px;padding:0px;clear:both;font-weight:normal;line-height:1.5;color:rgb(0,0,0);"><span style="color:rgb(51,51,51);background-color:rgb(246,225,153);">$ sudo nano hostname</span></h4><h3 style="font-size:1.3125em;margin:29px 0px 22px;padding:0px;clear:both;line-height:1.5;color:rgb(0,0,0);font-weight:normal;"><b>3. 원하는 이름으로 바꾸고 저장하기</b></h3><span><img src="https://blog.kakaocdn.net/dn/bxmugr/btqNXE88bT8/juIxbmhF6CPpDPjrDTV0bK/img.png" style="border:none;vertical-align:top;width:641px;margin:0px;height:auto;" alt="img.png" /></span><h3 style="font-size:1.3125em;margin:29px 0px 22px;padding:0px;clear:both;line-height:1.5;color:rgb(0,0,0);font-weight:normal;"><b>4. reboot</b></h3><span><img src="https://blog.kakaocdn.net/dn/bfMVLE/btqNXFUvBSf/KVLTXGyySyf8kzNn3xknvk/img.png" width="413" style="border:none;vertical-align:top;margin:0px;height:auto;" alt="img.png" /></span><h3 style="font-size:1.3125em;margin:29px 0px 22px;padding:0px;clear:both;line-height:1.5;color:rgb(0,0,0);font-weight:normal;"><b>5. 변경확인!</b></h3><p style="margin-bottom:32px;font-size:0.9375em;line-height:2;"><b>aws-ubuntu로 변경된 것을 확인할 수 있다.</b></p><span><img src="https://blog.kakaocdn.net/dn/bOLPSu/btqNXFAcLrd/HKoWf0XuS3HNKK91s6KDX0/img.png" width="346" style="border:none;vertical-align:top;margin:0px;height:auto;" alt="img.png" /></span></div>]]></description>
<dc:creator>최고관리자</dc:creator>
<dc:date>2025-01-09T10:53:04+09:00</dc:date>
</item>

</channel>
</rss>
