{"id":1083,"date":"2016-07-21T00:11:53","date_gmt":"2016-07-20T15:11:53","guid":{"rendered":"http:\/\/blog.moramcnt.com\/?p=1083"},"modified":"2016-07-28T09:44:48","modified_gmt":"2016-07-28T00:44:48","slug":"%ec%9a%b0%eb%b6%84%ed%88%ac-apache2-tomcat7-%ec%97%b0%eb%8f%99","status":"publish","type":"post","link":"http:\/\/blog.moramcnt.com\/?p=1083","title":{"rendered":"\uc6b0\ubd84\ud22c Apache2, Tomcat7 \uc5f0\ub3d9"},"content":{"rendered":"<p>1. \uac1c\uc694<br \/>\n   \uc6b0\ubd84\ud22c 16.04\uc5d0 \uc804\uc790\uc815\ubd80\ud504\ub808\uc784\uc6cc\ud06c(spring)\ub85c \ub9cc\ub4e4\uc5b4\uc9c4 \uc0ac\uc774\ud2b8\ub97c \uc62c\ub9ac\uae30 \uc704\ud55c \ucc98\ub9ac\uc0ac\ud56d\uc744 \uc815\ub9ac\ud55c\uac83\uc73c\ub85c,<br \/>\n   \uae30\ubcf8\uc801\uc778 \ud1b0\ucea3, \uc544\ud30c\uce58\ub4f1\uc758 \uc124\uce58\ub294 \uc0dd\ub7b5\ud558\uace0 \uadf8 \uc774\ud6c4 \uc791\uc5c5\uc778 \uc124\uc815\uc744 \uc704\uc8fc\ub85c \ud558\uc5ec \uc815\ub9ac\ud558\uc600\ub2e4.<\/p>\n<p>2. \uac00\uc0c1\ud638\uc2a4\ud2b8<br \/>\n   www.withpoem.com \ub77c\ub294 \ub3c4\uba54\uc778\uc744 Apache2\uc5d0 \uac00\uc0c1\ud638\uc2a4\ud2b8\ub85c \uc62c\ub9ac\uae30 \uc704\ud574\uc11c<br \/>\n   \ub2e4\uc74c\uacfc \uac19\uc774 \ud55c\ub2e4.<\/p>\n<pre>\r\ncd \/etc\/apache2\/sites-available\r\nvi www.withpoem.com.conf\r\n<\/pre>\n<p>   \uc704\uc640 \uac19\uc774 \ud558\uac8c \ub418\uba74 sites-enabled \ud3f4\ub354\uc5d0 www.withpoem.com.conf\uac00 \ub9cc\ub4e4\uc5b4\uc9c0\uac8c \ub41c\ub2e4.<\/p>\n<pre>\r\n<VirtualHost *:80>\r\n\tServerAdmin admin@moramcnt.com\r\n\tDocumentRoot \/home\/moram\/Service\/PoemWebSolution\/poem-web\r\n\tDirectoryIndex index.html index.jsp index.do\r\n\tServerName www.withpoem.com\r\n\r\n\t<Directory \/home\/moram\/Service\/PoemWebSolution\/poem-web>\r\n\t\tOptions FollowSymLinks\r\n\t\tAllowOverride None\r\n\t\tOrder allow,deny\r\n\t\tAllow from all\r\n\t\tRequire all granted\r\n\t<\/Directory>\r\n\r\n\tAlias \/upload \/home\/moram\/Service\/Data\/PoemData\/upload\r\n\t<Directory \/home\/moram\/Service\/Data\/PoemData\/upload>\r\n\t\tOptions FollowSymLinks\r\n\t\tAllowOverride None\r\n\t\tOrder allow,deny\r\n\t\tAllow from all\r\n\t\tRequire all granted\r\n\t<\/Directory>\r\n\tLogLevel warn\r\n\tErrorLog \/var\/log\/apache2\/error-www.withpoem.com.log\r\n\tCustomLog \/var\/log\/apache2\/access-www.withpoem.com.log combined\r\n\r\n\tJkMount \/*.do ajp13_worker\r\n\tJkMount \/*.jsp ajp13_worker\r\n\tJkMount \/*.json ajp13_worker\r\n<\/VirtualHost>\r\n<\/pre>\n<p>  &#8211; \ucc38\uace01 : Require all granted \uc744 \uc548\ud574\uc8fc\uba74  Forbidden You don&#8217;t have permission to access \/ on this server. \uc5d0\ub7ec\uac00 \ubc1c\uc0dd\ud560\uc218 \uc788\uc74c<br \/>\n  &#8211; \ucc38\uace02 : \uc708\ub3c4\uc6b0 \uc11c\ubc84\uc758 \uac00\uc0c1\ub514\ub809\ud1a0\ub9ac\ub294 \uc704\uc5d0 \uc788\ub294 Alias\ub97c \ud1b5\ud574 \ud574\uacb0\ud574\uc57c \ud55c\ub2e4.<\/p>\n<p>  \uc704\uc5d0\uc11c \uc791\uc131\ud55c \uac00\uc0c1\ud638\uc2a4\ud2b8 \ud30c\uc77c\uc744 \uc774\uc6a9\ud558\uc5ec a2ensite\ub97c \uc774\uc6a9\ud558\uc5ec \ub4f1\ub85d\ucc98\ub9ac\ud55c\ub2e4.<br \/>\n<Pre><br \/>\nsudo a2ensite www.withpoem.com.conf<\/p>\n<p>2. \ud1b0\ucea3 server.xml \ub4f1\ub85d<br \/>\n   server.xml\uc5d0 \uc544\ub798\uc640 \uac19\uc774 Host\ub97c \ub4f1\ub85d\ud55c\ub2e4.<\/p>\n<pre>\r\ncd \/etc\/tomcat7\r\nvi server.xml\r\n<\/pre>\n<pre>\r\n<Host name=\"www.withpoem.com\"  appBase=\"webapps\" unpackWARs=\"true\" autoDeploy=\"true\" xmlValidation=\"false\" xmlNamespaceAware=\"false\">\r\n\t<Valve className=\"org.apache.catalina.valves.AccessLogValve\" directory=\"logs\"\r\n\tprefix=\"withpoem_access_log.\" suffix=\".txt\"\r\n\tpattern=\"%h %l %u %t &quot;%r&quot; %s %b\" \/>\r\n\t<Context docBase=\"\/home\/moram\/Service\/PoemWebSolution\/poem-web\" path=\"\" reloadable=\"true\"\/>\r\n<\/Host>\r\n<\/pre>\n<p>3. \uc11c\ube44\uc2a4 \uc7ac\uc2dc\uc791<\/p>\n<pre>\r\nsudo service tomcat7 restart\r\nsudo service apache2 restart\r\n<\/pre>\n<p>4. \uc708\ub3c4\uc6b0\uc5d0\uc11c \ub9ac\ub205\uc2a4\ub85c\uc758 \uc774\uad00\uc2dc \uc8fc\uc758\uc0ac\ud56d<br \/>\n  \ud639\uc2dc log4j.xml \ub610\ub294 log4j2.xml \uc5d0\uc11c \ud30c\uc77c\uc744 \uae30\ub85d\ud558\ub294 \ubd80\ubd84\uc774 \uc788\ub2e4\uba74 \uc544\ub798\uc640 \uac19\uc774 \ub9ac\ub205\uc2a4 \uae30\uc900\uc73c\ub85c \uc804\ud658\ud560 \ud544\uc694\uac00 \uc788\ub2e4.<\/p>\n<pre>\r\n<RollingFile name=\"rollingFileAppender\" fileName=\"\/var\/log\/weblog\/poem-web\/poem.log\" filePattern=\"\/var\/log\/weblog\/poem-web\/$${date:yyyy-MM}\/poem-%d{MM-dd-yyyy}-%i.log.gz\">\r\n\t<PatternLayout pattern=\"%d %5p [%c] %m%n\" \/>\r\n\t<Policies>\r\n\t\t<TimeBasedTriggeringPolicy \/>\r\n\t\t<SizeBasedTriggeringPolicy size=\"80 MB\" \/>\r\n\t<\/Policies>\r\n\t<DefaultRolloverStrategy max=\"7\" fileIndex=\"min\" \/>\r\n<\/RollingFile>\r\n\r\n<\/pre>\n<p> \ub610\ud55c globals.properties\ub610\ub294 context-properties.xml \ub4f1\uc5d0\ub3c4 \ub514\ub809\ud1a0\ub9ac\uac00 \uc62c\ubc14\ub978\uc9c0 \ud655\uc778\ud574 \ubcfc\ud544\uc694\uac00 \uc788\ub2e4.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. \uac1c\uc694 \uc6b0\ubd84\ud22c 16.04\uc5d0 \uc804\uc790\uc815\ubd80\ud504\ub808\uc784\uc6cc\ud06c(spring)\ub85c \ub9cc\ub4e4\uc5b4\uc9c4 \uc0ac\uc774\ud2b8\ub97c \uc62c\ub9ac\uae30 \uc704\ud55c \ucc98\ub9ac\uc0ac\ud56d\uc744 \uc815\ub9ac\ud55c\uac83\uc73c\ub85c, \uae30\ubcf8\uc801\uc778 \ud1b0\ucea3, \uc544\ud30c\uce58\ub4f1\uc758 \uc124\uce58\ub294 \uc0dd\ub7b5\ud558\uace0 \uadf8 \uc774\ud6c4 \uc791\uc5c5\uc778 \uc124\uc815\uc744 \uc704\uc8fc\ub85c \ud558\uc5ec \uc815\ub9ac\ud558\uc600\ub2e4. 2. \uac00\uc0c1\ud638\uc2a4\ud2b8 www.withpoem.com \ub77c\ub294 \ub3c4\uba54\uc778\uc744 Apache2\uc5d0 \uac00\uc0c1\ud638\uc2a4\ud2b8\ub85c \uc62c\ub9ac\uae30 \uc704\ud574\uc11c \ub2e4\uc74c\uacfc \uac19\uc774 \ud55c\ub2e4. cd \/etc\/apache2\/sites-available vi www.withpoem.com.conf \uc704\uc640 \uac19\uc774 \ud558\uac8c \ub418\uba74 sites-enabled \ud3f4\ub354\uc5d0 www.withpoem.com.conf\uac00 \ub9cc\ub4e4\uc5b4\uc9c0\uac8c \ub41c\ub2e4. ServerAdmin admin@moramcnt.com DocumentRoot \/home\/moram\/Service\/PoemWebSolution\/poem-web DirectoryIndex index.html index.jsp [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[31,49],"tags":[192,193,191],"class_list":["post-1083","post","type-post","status-publish","format-standard","hentry","category-31","category-unix","tag-apache2","tag-tomcat7","tag-191"],"_links":{"self":[{"href":"http:\/\/blog.moramcnt.com\/index.php?rest_route=\/wp\/v2\/posts\/1083","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/blog.moramcnt.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.moramcnt.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.moramcnt.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.moramcnt.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1083"}],"version-history":[{"count":8,"href":"http:\/\/blog.moramcnt.com\/index.php?rest_route=\/wp\/v2\/posts\/1083\/revisions"}],"predecessor-version":[{"id":1101,"href":"http:\/\/blog.moramcnt.com\/index.php?rest_route=\/wp\/v2\/posts\/1083\/revisions\/1101"}],"wp:attachment":[{"href":"http:\/\/blog.moramcnt.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1083"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.moramcnt.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1083"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.moramcnt.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1083"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}