Home Backend Development PHP Tutorial nginx combines with tomcat to make a simple reverse proxy tomcat nginx apache wildfly installation and configuration nginx tomcat load balancing

nginx combines with tomcat to make a simple reverse proxy tomcat nginx apache wildfly installation and configuration nginx tomcat load balancing

Jul 29, 2016 am 08:53 AM
nginx tomcat

1. Simple instructions

Install nginx on server 1, listen on port 80, ip: 192.168.56.201

Install tomcat on server 2, listen on port 8080

2. Modify nginx configuration

vi nginx.conf
Copy after login
<span style="font-family:Arial, Helvetica, sans-serif;">找到server一段,并在localtion最下面加入</span><span style="font-family: Arial, Helvetica, sans-serif;">proxy_pass http://192.168.56.202:8080;修改后的配置如下</span>
Copy after login
<span style="font-family: Arial, Helvetica, sans-serif;"> server {</span>
Copy after login
        listen       80;
        server_name  localhost;

        #charset koi8-r;

        #access_log  logs/host.access.log  main;

        location / {
            root   html;
            index  index.html index.htm;
            proxy_pass http://192.168.56.202:8080;
        }
Copy after login
3. Start nginx and follow on server 1 respectively Tomcat on server 2
4. Access http://192.168.56.201 with the browser. At this time, you can see that the page jumps to the familiar tomcat welcome page.

The above introduces nginx combined with tomcat to make a simple reverse proxy, including the content of tomcat and nginx. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to deploy jar project in tomcat How to deploy jar project in tomcat Apr 21, 2024 am 07:27 AM

How to deploy jar project in tomcat

How to allow external network access to tomcat server How to allow external network access to tomcat server Apr 21, 2024 am 07:22 AM

How to allow external network access to tomcat server

How to deploy multiple projects in tomcat How to deploy multiple projects in tomcat Apr 21, 2024 am 09:33 AM

How to deploy multiple projects in tomcat

Where is the tomcat installation directory? Where is the tomcat installation directory? Apr 21, 2024 am 07:48 AM

Where is the tomcat installation directory?

Where is the root directory of the tomcat website? Where is the root directory of the tomcat website? Apr 21, 2024 am 09:27 AM

Where is the root directory of the tomcat website?

How to check the number of concurrent connections in tomcat How to check the number of concurrent connections in tomcat Apr 21, 2024 am 08:12 AM

How to check the number of concurrent connections in tomcat

How to check the port number of tomcat How to check the port number of tomcat Apr 21, 2024 am 08:00 AM

How to check the port number of tomcat

How to run two projects with different port numbers in tomcat How to run two projects with different port numbers in tomcat Apr 21, 2024 am 09:00 AM

How to run two projects with different port numbers in tomcat

See all articles