users@glassfish.java.net

Re: Why do I need Apache web server in front of GlassFish?

From: <forums_at_java.net>
Date: Fri, 10 Feb 2012 12:47:46 -0600 (CST)

[quote=user_00]

Hello,

I have 2 questions regarding this topic

1) Do I have to use Apache web server in front of GlassFish, or GlassFish
can be used as my standalone application server?

[/quote]

Strictly speaking, I don't think so.  Unix-based/-like operating systems
usually prevent user processes from binding to any port below 1024.  You can
make GlassFish bind to, say, port 80, as far as I know, but the typical
practice with application servers is to let them run on their desired,
default port, and put a thin web server in front of it.  Typically, you have
to have root access to bind to ports under 1024, and it's considered a bad
practice to run your applicaiton server as root.  Apache handles that aspect
fairly well (iirc, an apache process runs as root, but forks and sets the UID
to a non-privileged user before doing anything with the incoming request).
 Perhaps someone more focused on security can fill in the holes and correct
any mistakes. :)

[quote=user_00]

2) If yes I do have and it provides extra functionality, what are they and
cant they be done on GlassFish?

[/quote]

Some people use Apache to serve static content, under the assumption that
that's faster than letting an app server do that.  I'm not aware of any real
performance issue, but if there is one, I can't imagine it's very much.
 Again, I could be wrong. :)


--
[Message sent by forum member 'jdlee']
View Post: http://forums.java.net/node/883433