1 Reply Latest reply on Jul 24, 2012 4:33 AM by rhusar

    How good is Nginx instead Apache

    dcarpio

      Hi everyone. I need to configure a JBoss Cluster (with AS 7) but I have to use Nginx as web server because it's already installed in the place that I'm working. I have found that Nginx is faster and lighter that Apache but what I really want to know is how dificult is to configure Nginx in order to work with JBoss AS7 and how it's performance in production environment.

       

      I hope someone could answer my question. Thanks in advance.

        • 1. Re: How good is Nginx instead Apache
          rhusar

          Well, nginx has build-in proxy support, so it will work out of box if you want to just use HTTP connector. You will need something like this:

           

          server {

            listen   80;

            server_name example.com;

            root  /var/www/yourwebapp;

            location ~ \.jsp$ {

             proxy_pass   http://localhost:8080;

             proxy_set_header  X-Real-IP $remote_addr;

             proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;

             proxy_set_header  Host $http_host;

            }

          }


          Also, I did see several modules to bring APJ support for nginx but I would be careful about their stability.

          https://github.com/yaoweibin/nginx_ajp_module

          1 of 1 people found this helpful