配置server.xml,找到Service,在<Service></Service>中添加监听端口便可
例如访问http://localhost:8080/index
与访问http://localhost:8080/index
便可对同一应用进行访问。
若要更多端口访问,添加监听便可。web
配置server.xml,找到Service,在<Service></Service>中的<Engine></Engine>中配置Host
注意图中注意点,便可实现http://domain1.com
访问webproject1,http://domain1.com
访问webproject2dom
配置server.xml,找到Service,复制一份Service,对两个Service分别配置http://www.domain1.com:8080
访问webproject1,http://www.domain2.com:9090
访问webproject2spa