Nginx+tomcat cluster configuration under Windows

Source: Internet
Author: User


1. Download and configure the necessary files

    1. Download Nginx:http://nginx.org/download/nginx-1.6.2.zip
    2. Download Tomcat: Http://mirror.bit.edu.cn/apache/tomcat/tomcat-8/v8.0.12/bin/apache-tomcat-8.0.12-windows-x64.zip

2. Unzip the download file

Unzip N Ginx-1.6.2.zip to the E:\nginx-1.6.2 directory:

Unzip Apache-tomcat-8.0.12-windows-x64.zip to the E:\apache-tomcat-8.0.12 directory:

The above directory is my extracted directory, specific to which directory, according to the actual situation to modify.

3. Configuring Tomcat

Locate the tomcat configuration file E:\apache-tomcat-8.0.12\conf\server.xml configuration file

Find the following :

If 8005 and 8080 are occupied, they are modified to other unoccupied ports, which need to be used later

Duplicate a copy of Tomcat in the sibling directory : E:\apache-tomcat-8.0.13 I'm here to change 2 to 3. , and modify the configuration file :

After modifying ports that are not occupied by the upper port, here I change to 8006 and 8088

    1. Configure Nginx

Locate the E:\nginx-1.6.2\conf\nginx.conf configuration file

On #gzip; The following configuration is added after this line

Here I set the nginx port for the

    1. Test

Launch two tomcat instances separately, running E:\apache-tomcat-8.0.12\bin\startup.bat and e:\ directly Apache-tomcat-8.0.13\bin\startup.bat

Then start nginxand run E:\nginx-1.6.2\nginx.exe directly.

Then enter in the browser : Http://localhost:800 The following results will appear, stating that your configuration was successful :

Nginx+tomcat cluster configuration under Windows

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.