Home > Backend Development > PHP Tutorial > nginx proxy local JBoss access difficult problem

nginx proxy local JBoss access difficult problem

WBOY
Release: 2016-07-29 09:03:36
Original
1129 people have browsed it

It’s the first day of work after the new year, and all the back-end developers are not here.

So I tried to configure JBoss. After modifying the Connecter configuration, I found that accessing the page was very slow.

Directly accessed the local JBoss and found that the page opened quickly.

It turns out that Jboss uses the HTTP1.1 protocol by default during configuration, and keepalive is enabled by default, while Nginx as a reverse proxy only supports the HTTP1.0 protocol. When Nginx interacts with the back-end server, it adopts the HTTP 1.0 mode. It considers that each connection is closed before the request is completed. The back-end server uses keepalive, so Nginx waits until the back-end keepalive connection is closed before returning to the browser. Therefore, Accessing the page is very slow.

The root cause of the problem has been found, and it can be modified quickly. Refer to the http://tomcat.apache.org/tomcat-6.0-doc/config/http.html document, set maxKeepAliveRequests=1, and turn off keepalive. After restarting jboss, the problem is solved.

//-------------Part of the content is referenced from the Internet-------------//

The above introduces the problem of difficulty in accessing local JBoss through nginx proxy, including the relevant aspects. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template