{"id":1221,"date":"2025-07-30T17:06:54","date_gmt":"2025-07-30T08:06:54","guid":{"rendered":"https:\/\/absol.kr\/?p=1221"},"modified":"2025-07-30T17:06:54","modified_gmt":"2025-07-30T08:06:54","slug":"ubuntu%ec%97%90-apache-%ec%84%a4%ec%b9%98","status":"publish","type":"post","link":"https:\/\/absol.kr\/?p=1221","title":{"rendered":"Ubuntu\uc5d0 Apache \uc124\uce58"},"content":{"rendered":"\n<p>\uc6b0\ubd84\ud22c\uc5d0 Apache\ub97c \uc124\uce58\ud558\ub294 \ub2e8\uacc4\ub294 \ub2e4\uc74c\uacfc \uac19\ub2e4.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1. \ud328\ud0a4\uc9c0 \ubaa9\ub85d \uc5c5\ub370\uc774\ud2b8<\/h3>\n\n\n\n<p>\uac00\uc7a5 \uba3c\uc800, \uc2dc\uc2a4\ud15c\uc758 \ud328\ud0a4\uc9c0 \ubaa9\ub85d\uc744 \ucd5c\uc2e0 \uc0c1\ud0dc\ub85c \uc5c5\ub370\uc774\ud2b8\ud558\uc5ec \ucd5c\uc2e0 \ubc84\uc804\uc758 Apache\ub97c \uc124\uce58\ud560 \uc218 \uc788\ub3c4\ub85d \uc900\ube44\ud569\ub2c8\ub2e4.<\/p>\n\n\n\n<p>bash<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt update<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">2. Apache2 \uc6f9 \uc11c\ubc84 \uc124\uce58<\/h3>\n\n\n\n<p>\uc774\uc81c Apache2\ub97c \uc124\uce58\ud560 \ucc28\ub840\uc785\ub2c8\ub2e4. \ub2e4\uc74c \uba85\ub839\uc5b4\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc124\uce58\ub97c \uc9c4\ud589\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<p>bash<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install apache2 -y<\/code><\/pre>\n\n\n\n<p>\uc774 \uba85\ub839\uc5b4\ub294&nbsp;<code>apache2<\/code>&nbsp;\ud328\ud0a4\uc9c0\ub97c \uc124\uce58\ud558\uba70,&nbsp;<code>-y<\/code>&nbsp;\uc635\uc158\uc740 \uc124\uce58 \uc911 \ud655\uc778 \uba54\uc2dc\uc9c0\uc5d0 \uc790\ub3d9\uc73c\ub85c &#8216;\uc608&#8217;\ub77c\uace0 \uc751\ub2f5\ud558\ub3c4\ub85d \ud569\ub2c8\ub2e4.&nbsp;<a target=\"_blank\" rel=\"noreferrer noopener\" href=\"https:\/\/pinggoopark.tistory.com\/entry\/Ubuntu-%EC%9A%B0%EB%B6%84%ED%88%AC%EC%97%90-apache2-%EC%84%A4%EC%B9%98%ED%95%98%EA%B3%A0-%EC%8B%A4%ED%96%89%ED%95%B4%EB%B3%B4%EC%9E%90\"><\/a>&nbsp;<a target=\"_blank\" rel=\"noreferrer noopener\" href=\"https:\/\/iwoohaha.tistory.com\/271\"><\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">3. Apache2 \uc11c\ube44\uc2a4 \uc0c1\ud0dc \ud655\uc778<\/h3>\n\n\n\n<p>\uc124\uce58\uac00 \uc644\ub8cc\ub418\uba74 Apache2 \uc11c\ube44\uc2a4\uac00 \uc81c\ub300\ub85c \uc2e4\ud589\ub418\uace0 \uc788\ub294\uc9c0 \ud655\uc778\ud574\uc57c \ud569\ub2c8\ub2e4. \ub2e4\uc74c \uba85\ub839\uc5b4\ub85c \uc0c1\ud0dc\ub97c \uc810\uac80\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<p>bash<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl status apache2<\/code><\/pre>\n\n\n\n<p>\uc815\uc0c1\uc801\uc73c\ub85c \uc2e4\ud589 \uc911\uc774\ub77c\uba74 &#8216;active (running)&#8217; \uba54\uc2dc\uc9c0\ub97c \ud655\uc778\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">4. \ubc29\ud654\ubcbd \uc124\uc815 (UFW)<\/h3>\n\n\n\n<p>\uc6b0\ubd84\ud22c\uc5d0\uc11c UFW(Uncomplicated Firewall)\ub97c \uc0ac\uc6a9\ud558\uace0 \uc788\ub2e4\uba74, \uc678\ubd80\uc5d0\uc11c \uc6f9 \uc11c\ubc84\uc5d0 \uc811\uadfc\ud560 \uc218 \uc788\ub3c4\ub85d HTTP(80\ubc88 \ud3ec\ud2b8) \ubc0f HTTPS(443\ubc88 \ud3ec\ud2b8) \ud2b8\ub798\ud53d\uc744 \ud5c8\uc6a9\ud574\uc57c \ud569\ub2c8\ub2e4.<\/p>\n\n\n\n<p>\uba3c\uc800, \uc0ac\uc6a9 \uac00\ub2a5\ud55c UFW \uc560\ud50c\ub9ac\ucf00\uc774\uc158 \ud504\ub85c\ud30c\uc77c\uc744 \ud655\uc778\ud569\ub2c8\ub2e4:<\/p>\n\n\n\n<p>bash<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo ufw app list<\/code><\/pre>\n\n\n\n<p>\uc77c\ubc18\uc801\uc73c\ub85c \ub2e4\uc74c\uacfc \uac19\uc740 \ud504\ub85c\ud30c\uc77c\uc744 \ubcfc \uc218 \uc788\uc2b5\ub2c8\ub2e4:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>Apache<\/code>\u00a0(HTTP 80\ubc88 \ud3ec\ud2b8\ub9cc \ud5c8\uc6a9)<\/li>\n\n\n\n<li><code>Apache Full<\/code>\u00a0(HTTP 80\ubc88 \ud3ec\ud2b8\uc640 HTTPS 443\ubc88 \ud3ec\ud2b8 \ubaa8\ub450 \ud5c8\uc6a9)<\/li>\n\n\n\n<li><code>Apache Secure<\/code>\u00a0(HTTPS 443\ubc88 \ud3ec\ud2b8\ub9cc \ud5c8\uc6a9)<\/li>\n<\/ul>\n\n\n\n<p>\uc6d0\ud558\ub294 \ud504\ub85c\ud30c\uc77c\uc744 \uc120\ud0dd\ud558\uc5ec \ud5c8\uc6a9\ud569\ub2c8\ub2e4. \ub300\ubd80\ubd84\uc758 \uacbd\uc6b0&nbsp;<code>Apache Full<\/code>\uc744 \uad8c\uc7a5\ud569\ub2c8\ub2e4.<\/p>\n\n\n\n<p>bash<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo ufw allow 'Apache Full'<\/code><\/pre>\n\n\n\n<p>\ubcc0\uacbd\uc0ac\ud56d\uc744 \uc801\uc6a9\ud558\uae30 \uc704\ud574 UFW\ub97c \uc7ac\ub85c\ub4dc\ud558\uac70\ub098 \ud65c\uc131\ud654\ud569\ub2c8\ub2e4:<\/p>\n\n\n\n<p>bash<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo ufw enable<\/code><\/pre>\n\n\n\n<p>(UFW\uac00 \ube44\ud65c\uc131\ud654\ub41c \uacbd\uc6b0\uc5d0\ub9cc \uc2e4\ud589\ud569\ub2c8\ub2e4.)<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">5. \uc6f9 \ube0c\ub77c\uc6b0\uc800\ub97c \ud1b5\ud55c \uc124\uce58 \ud655\uc778<\/h3>\n\n\n\n<p>Apache\uac00 \uc815\uc0c1\uc801\uc73c\ub85c \uc124\uce58\ub418\uc5c8\ub294\uc9c0 \ucd5c\uc885 \ud655\uc778\ud558\ub294 \ub2e8\uacc4\uc785\ub2c8\ub2e4. \uc6f9 \ube0c\ub77c\uc6b0\uc800\ub97c \uc5f4\uace0 \uc11c\ubc84\uc758 IP \uc8fc\uc18c\ub97c \uc785\ub825\ud558\uc5ec \uc811\uc18d\ud574 \ubd05\ub2c8\ub2e4.<\/p>\n\n\n\n<p>\uc608:&nbsp;<code>http:\/\/\uc11c\ubc84_IP_\uc8fc\uc18c<\/code>&nbsp;<a target=\"_blank\" rel=\"noreferrer noopener\" href=\"https:\/\/sosodev.tistory.com\/entry\/Apache-Apache-%EC%84%A4%EC%B9%98%ED%95%98%EA%B8%B0\"><\/a><\/p>\n\n\n\n<p>\uc815\uc0c1\uc801\uc73c\ub85c Apache\uac00 \uc124\uce58\ub418\uc5c8\ub2e4\uba74 &#8220;Apache2 Ubuntu Default Page&#8221;\ub77c\ub294 \ubb38\uad6c\uac00 \ud3ec\ud568\ub41c \uae30\ubcf8 \uc6f9\ud398\uc774\uc9c0\uac00 \ub098\ud0c0\ub0a0 \uac83\uc785\ub2c8\ub2e4.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">6. (\uc120\ud0dd \uc0ac\ud56d) \uc6f9\uc0ac\uc774\ud2b8 \ud648 \ub514\ub809\ud130\ub9ac \ubcc0\uacbd<\/h3>\n\n\n\n<p>\uae30\ubcf8\uc801\uc73c\ub85c Apache\uc758 \uc6f9\uc0ac\uc774\ud2b8 \ud648 \ub514\ub809\ud130\ub9ac\ub294&nbsp;<code>\/var\/www\/html<\/code>\uc785\ub2c8\ub2e4. \ub9cc\uc57d \ub2e4\ub978 \uacbd\ub85c\ub97c \uc0ac\uc6a9\ud558\uace0 \uc2f6\ub2e4\uba74&nbsp;<code>\/etc\/apache2\/sites-available\/000-default.conf<\/code>&nbsp;\ud30c\uc77c\uc744 \uc218\uc815\ud558\uc5ec \ubcc0\uacbd\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.&nbsp;<a target=\"_blank\" rel=\"noreferrer noopener\" href=\"https:\/\/nyangnyangworld.tistory.com\/4\"><\/a>&nbsp;<a target=\"_blank\" rel=\"noreferrer noopener\" href=\"https:\/\/nyangnyangworld.tistory.com\/4\"><\/a><\/p>\n\n\n\n<p>\ud30c\uc77c\uc744 \uc5f4\uace0&nbsp;<code>DocumentRoot<\/code>&nbsp;\uc124\uc815\uc744 \ubcc0\uacbd\ud55c \ud6c4 Apache \uc11c\ube44\uc2a4\ub97c \uc7ac\uc2dc\uc791\ud558\uba74 \ub429\ub2c8\ub2e4.<\/p>\n\n\n\n<p>bash<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo nano \/etc\/apache2\/sites-available\/000-default.conf<\/code><\/pre>\n\n\n\n<p><code>DocumentRoot \/var\/www\/html<\/code>&nbsp;\ubd80\ubd84\uc744 \uc6d0\ud558\ub294 \uacbd\ub85c\ub85c \ubcc0\uacbd\ud558\uace0 \uc800\uc7a5\ud55c \ud6c4 Apache\ub97c \uc7ac\uc2dc\uc791\ud569\ub2c8\ub2e4.<\/p>\n\n\n\n<p>bash<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl restart apache2<\/code><\/pre>\n\n\n\n<p>\uc774 \ub2e8\uacc4\ub4e4\uc744 \ud1b5\ud574 \uc6b0\ubd84\ud22c \uc2dc\uc2a4\ud15c\uc5d0 Apache \uc6f9 \uc11c\ubc84\ub97c \uc131\uacf5\uc801\uc73c\ub85c \uc124\uce58\ud558\uace0 \uad6c\uc131\ud558\uc2e4 \uc218 \uc788\ub2e4<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\uc6b0\ubd84\ud22c\uc5d0 Apache\ub97c \uc124\uce58\ud558\ub294 \ub2e8\uacc4\ub294 \ub2e4\uc74c\uacfc \uac19\ub2e4. 1. \ud328\ud0a4\uc9c0 \ubaa9\ub85d \uc5c5\ub370\uc774\ud2b8 \uac00\uc7a5 \uba3c\uc800, \uc2dc\uc2a4\ud15c\uc758 \ud328\ud0a4\uc9c0 \ubaa9\ub85d\uc744 \ucd5c\uc2e0 \uc0c1\ud0dc\ub85c \uc5c5\ub370\uc774\ud2b8\ud558\uc5ec \ucd5c\uc2e0 \ubc84\uc804\uc758 Apache\ub97c \uc124\uce58\ud560 \uc218 \uc788\ub3c4\ub85d \uc900\ube44\ud569\ub2c8\ub2e4. bash 2. Apache2 \uc6f9 \uc11c\ubc84 \uc124\uce58 \uc774\uc81c Apache2\ub97c \uc124\uce58\ud560 \ucc28\ub840\uc785\ub2c8\ub2e4. \ub2e4\uc74c \uba85\ub839\uc5b4\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc124\uce58\ub97c \uc9c4\ud589\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. bash \uc774 \uba85\ub839\uc5b4\ub294&nbsp;apache2&nbsp;\ud328\ud0a4\uc9c0\ub97c \uc124\uce58\ud558\uba70,&nbsp;-y&nbsp;\uc635\uc158\uc740 \uc124\uce58 \uc911 \ud655\uc778 \uba54\uc2dc\uc9c0\uc5d0 \uc790\ub3d9\uc73c\ub85c &#8216;\uc608&#8217;\ub77c\uace0 \uc751\ub2f5\ud558\ub3c4\ub85d \ud569\ub2c8\ub2e4.&nbsp;&nbsp; 3. &hellip; <a href=\"https:\/\/absol.kr\/?p=1221\" class=\"more-link\">\ub354 \ubcf4\uae30<span class=\"screen-reader-text\"> &#8220;Ubuntu\uc5d0 Apache \uc124\uce58&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1221","post","type-post","status-publish","format-standard","hentry","category-d-service"],"_links":{"self":[{"href":"https:\/\/absol.kr\/index.php?rest_route=\/wp\/v2\/posts\/1221","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/absol.kr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/absol.kr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/absol.kr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/absol.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1221"}],"version-history":[{"count":1,"href":"https:\/\/absol.kr\/index.php?rest_route=\/wp\/v2\/posts\/1221\/revisions"}],"predecessor-version":[{"id":1222,"href":"https:\/\/absol.kr\/index.php?rest_route=\/wp\/v2\/posts\/1221\/revisions\/1222"}],"wp:attachment":[{"href":"https:\/\/absol.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1221"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/absol.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1221"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/absol.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1221"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}