maven tomcat deployed to the remote server

 

Add plug-in pom file

<!-- tomcat7 -->
<plugin>
   <groupId>org.apache.tomcat.maven</groupId>
   <artifactId>tomcat7-maven-plugin</artifactId>
   <version>2.2</version>
   <configuration>
      <port>80</port>
      <path>/guohang</path>
      <uriEncoding>UTF-8</uriEncoding>
      <update>true</update>
      <!--正式服务器-->
      <url>http://wechatguojihangyun.cn:8080/manager/text</url>
      <username>admin</username>
      <password>123456</password>
   </configuration>
</plugin>

 

 

 

 After this was done, to modify server configuration tomcat

Context.xml were modified under the manager and META-INF under the host-manager of the under webapps directory tomcat allow labels

<Valve className="org.apache.catalina.valves.RemoteAddrValve"
         allow="^.*$" />

Then modify the tomcat-users-xml file under the conf tomcat, add users and roles at the bottom

<role rolename="admin-gui"/>
<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<user username="admin" password="123456" roles="admin-gui,manager-gui,manager-script"/>

The best restart tomcat, visit http: // + domain name +: 8080 / Manager / HTML , enter a user name and password to log shows an arrangement that is ok ok, then just start the idea of remote configuration to deploy. Note that this is not a request for http protocol https.

Reference: https://blog.csdn.net/dong001687/article/details/79428078

Guess you like

Origin www.cnblogs.com/yunian139/p/11821101.html