之前我们在访问的时候使用的都是类似http://serverip/test或者http://serverip/jpress这种字样的URL,使用起来比较麻烦,所以呢,我们可以将tomcat和nginx结合在一起,可以通过nginx以下功能发布:
通过部署两个tomcat站点,分别采用nginx url rewrite方法和反向代理发布。
[root@zutuanxue ~]# cd /opt/tomcat1/webapps/
[root@zutuanxue webapps]# mv ROOT tomcat
[root@zutuanxue webapps]# mv jpress ROOT
[root@zutuanxue ~]# cd /opt/tomcat2/webapps/
[root@zutuanxue webapps]# mv ROOT tomcat
[root@zutuanxue webapps]# mv test ROOT
[root@zutuanxue ~]# dnf install nginx -y
[root@zutuanxue ~]# vim /etc/nginx/nginx.conf
[root@zut