nginx+tomcat-separation of dynamic and static (Centos: 6)

Nginx+tomcat-separation of dynamic and static

Operating environment:
a Centos:6
closes the firewall, the SElinux
installation package has been uploaded to the tomcat directory created by yourself
as follows:

[root@DB ~]# cd tomcat/
[root@DB tomcat]# ls
apache-tomcat-7.0.47.tar.gz  jdk-8u20-linux-x64.rpm  nginx-1.12.2.tar.gz

Start of operation:
1. Install the nginx source package and start the test. Refer to Nginx (Centos: 6—source installation)

2. Tomcat installation and start test Refer to the introduction and installation of Tomcat (Centos: 6)

3. Modify the nginx configuration file to integrate nginx and tomcat
1. Enter the nginx configuration file and modify

[root@DB tomcat]# vim /usr/local/nginx/conf/nginx.conf

Insert picture description here
Insert picture description here
Insert picture description here
2. Overload nginx

[root@DB tomcat]# nginx -s reload

Four, browser access

Insert picture description here

Compared with the dynamic and static separation and integration operation of apache+tomcat, the nginx+tomcat operation is much simpler. The two dynamic and static separation operations are for your reference!

Guess you like

Origin blog.csdn.net/qq_49296785/article/details/107573905