Home > Glassfish > How to configure proxy on Glassfish v3

How to configure proxy on Glassfish v3

If you are behind a proxy maybe you will want to set the proxy in Glassfish. There are few different ways to do that. #1 – You could use the admin web page. You can add the proxy settings : host and port with the admin. Into the admin web page, go to the Application Server at your left. After that on your right select : JVM Settings / JVM Options. Just add theses settings : http.proxyHost=myproxy.mydomain http.proxyPort=myproxy.port Glassfish_proxy.png Click here to enlarge #2 – You could use the command line Go into your Glassfish installation /bin and enter theses commands : asadmin create-jvm-options “-Dhttp.proxyHost=myproxy.mydomain” asadmin create-jvm-options “-Dhttp.proxyPort=myproxy.port” #3 – The last option is to edit manually domain.xml You add the settings in the “<java-config>” element. <java-config ...> <jvm-options>-Dhttp.proxyHost=myproxy.mydomain</jvm-options> <jvm-options>-Dhttp.proxyPort=myproxy.port</jvm-options> ...

About these ads
Categories: Glassfish Tags:
  1. July 22, 2011 at 3:45 am | #1

    May 18th, 2011 at 06:14 | #1 Reply | Quote
    One question please.
    I have an JavaScript application running on Glassfish server port 8080. It has a XMPP (trophyim) chat which uses Openfire http-bind to work. Now my question is how to set up Glassfish to proxy my request (e.g. localhost:8080/bosh) to Openfire (e.g. localhost:7070/http-bind)
    p.s. on Apache it is solved simply in conf/httpd.conf by adding:
    LoadModule proxy_module modules/mod_proxy.so
    LoadModule proxy_connect_module modules/mod_proxy_connect.so
    LoadModule proxy_http_module modules/mod_proxy_http.so
    Include conf/extra/httpd-vhosts.conf
    and configuring conf/extra/httpd-vhosts.conf as shown below:
    ProxyPass /bosh http://localhost:7070/http-bind/
    ProxyPassReverse /bosh http://localhost:7070/http-bind/
    so the question really is how to make this on Glassfish?
    with best regards,
    Toni Blagaic

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: