1.Tomcat浏览目录
找到安装目录下的文件/conf/web.xml, 找到以下配置节,将parame-value设置为true即可
<init-param>
<param-name>listings</param-name>
<param-value>false</param-value>
</init-param>
2.Tomcat新建不同端口的站点
在conf/server.xml中新增service元素,配置如下
<Service name="AngularJS">
<Connector connectionTimeout="20000" port="8081" protocol="HTTP/1.1" redirectPort="8443"/>
<Connector port="8010" protocol="AJP/1.3" redirectPort="8443"/>
<Engine defaultHost="AngularJS" name="AngularJS">
<Realm className="org.apache.catalina.realm.LockOutRealm">
<Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/>
</Realm>
<Host appBase="angularapp" autoDeploy="true" name="AngularJS" unpackWARs="true">
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" pattern="%h %l %u %t "%r" %s %b" prefix="angularapp_access_log" suffix=".txt"/>
<Context path="" docBase="/home/hys/install/apache-tomcat-8.0.32/angularapp" reloadable="true" workDir="/home/hys/install/apache-tomcat-8.0.32/angularapp" />
</Host>
</Engine>
</Service>