{"id":1354,"date":"2023-03-19T10:06:07","date_gmt":"2023-03-19T02:06:07","guid":{"rendered":"https:\/\/www.appblog.cn\/?p=1354"},"modified":"2023-04-29T09:02:40","modified_gmt":"2023-04-29T01:02:40","slug":"tomcat-modify-webapps-directory-and-config-virtual-hosts-to-achieve-domain-name-access","status":"publish","type":"post","link":"https:\/\/www.appblog.cn\/index.php\/2023\/03\/19\/tomcat-modify-webapps-directory-and-config-virtual-hosts-to-achieve-domain-name-access\/","title":{"rendered":"Tomcat\u4fee\u6539webapps\u76ee\u5f55\u53ca\u914d\u7f6e\u865a\u62df\u4e3b\u673a\u5b9e\u73b0\u57df\u540d\u8bbf\u95ee"},"content":{"rendered":"<p>CentOS\u4e0b\u5b89\u88c5Tomcat\uff1a<a target=\"_blank\" rel=\"noopener\" href=\"http:\/\/www.appblog.cn\/2018\/03\/04\/CentOS\u4e0b\u5b89\u88c5Tomcat\/\">http:\/\/www.appblog.cn\/2018\/03\/04\/CentOS\u4e0b\u5b89\u88c5Tomcat\/<\/a><\/p>\n<h2>\u4fee\u6539webapps\u76ee\u5f55<\/h2>\n<p><!-- more --><\/p>\n<pre><code class=\"language-shell\"># mkdir \/data\/www\/tomcat85\n# cp -R \/usr\/local\/tomcat85\/webapps\/* \/data\/www\/tomcat85\/\n# chown www -R \/data\/www\/tomcat85\n# vim \/usr\/local\/tomcat85\/conf\/server.xml\n# \/usr\/local\/tomcat85\/bin\/startup.sh<\/code><\/pre>\n<pre><code class=\"language-xml\">&lt;Host name=&quot;localhost&quot;  appBase=&quot;\/data\/www\/tomcat85&quot;\n    unpackWARs=&quot;true&quot; autoDeploy=&quot;true&quot;&gt;\n    ...\n&lt;\/Host&gt;<\/code><\/pre>\n<h2>\u914d\u7f6e\u865a\u62df\u4e3b\u673a\u5b9e\u73b0\u57df\u540d\u8bbf\u95ee<\/h2>\n<pre><code class=\"language-shell\"># mkdir \/data\/www\/Jenkins\n# chown www -R \/data\/www\/Jenkins\n# vim \/usr\/local\/tomcat85\/conf\/server.xml\n# \/usr\/local\/tomcat85\/bin\/startup.sh<\/code><\/pre>\n<pre><code class=\"language-xml\">&lt;Host name=&quot;jk.yezhou.me&quot; appBase=&quot;\/data\/www\/Jenkins&quot;\n    unpackWARs=&quot;true&quot; autoDeploy=&quot;true&quot;\n    xmlValidation=&quot;false&quot; xmlNamespaceAware=&quot;false&quot; &gt;\n    &lt;Context docBase=&quot;&quot; path=&quot;\/&quot; reloadable=&quot;true&quot; crossContext=&quot;true&quot; &gt;&lt;\/Context&gt;\n    &lt;!--Context docBase=&quot;admin&quot; path=&quot;\/admin\/&quot; reloadable=&quot;true&quot; crossContext=&quot;true&quot; &gt;&lt;\/Context--&gt;\n&lt;\/Host&gt;<\/code><\/pre>\n<p>\u8bbf\u95ee\u5730\u5740\uff1a<a target=\"_blank\" rel=\"noopener\" href=\"http:\/\/jk.yezhou.me:8080\/\">http:\/\/jk.yezhou.me:8080\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>CentOS\u4e0b\u5b89\u88c5Tomcat\uff1ahttp:\/\/www.appblog.cn\/2018\/03\/04\/CentOS [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[148],"class_list":["post-1354","post","type-post","status-publish","format-standard","hentry","category-devops-base","tag-tomcat"],"_links":{"self":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1354","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/comments?post=1354"}],"version-history":[{"count":0,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1354\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/media?parent=1354"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/categories?post=1354"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/tags?post=1354"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}