java - pom.xml文件中如何配置tomcat,使我这个服务只能被一个固定ip访问
PHP中文网
PHP中文网 2017-04-18 10:01:53
0
3
557
PHP中文网
PHP中文网

认证高级PHP讲师

reply all(3)
迷茫

This thing should be restricted directly from the server. Why do it need to be done in tomcat

洪涛

The fixed IP is the IP of your machine

阿神

Your idea is wrong. The configuration in your pom is the configured maven plug-in.
Do you want to execute it on your server maven tomcat:run? Maven should not be installed on your server, right?

What you need to adjust is the server.xml file of the tomcat you are running on the server,

In <Engine>里面新添加一个<host>, like this:

<Host name="xxx.com" appBase="/var/www/demo"
       unpackWARs="true" autoDeploy="true"
       xmlValidation="false" xmlNamespaceAware="false"></Host>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template