logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Settings for Apache to Proxy to containerless java.jar
Author
airforceboricua



Joined: 19 Sep 2014
Posts: 4
Location: Austin, TX

PostPosted: Fri 19 Sep '14 19:00    Post subject: Settings for Apache to Proxy to containerless java.jar Reply with quote

I am in the middle of evaluating a containerless vs containered deployment approach and I am trying to configure Apache to point to my java.jar file in a containerless deployment. I've read that containerless is the way to go now vs using tomcat or other containered middle-ware applications.

Has anyone ever gone through this exercise before? Could you please direct me on where and how in Apache I should make my change?
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Wed 24 Sep '14 1:36    Post subject: Reply with quote

There is always a container. The sentence refers to a lack of a Java EE container as referenced in the specification, so you will always get an OS process executing something.

If the client shall not execute the jar file, you need container such as tomcat, jetty,netty, etc.
Back to top
airforceboricua



Joined: 19 Sep 2014
Posts: 4
Location: Austin, TX

PostPosted: Wed 24 Sep '14 15:01    Post subject: Reply with quote

Quote:
James Blond
PostPosted: Tue 23 Sep '14 17:36 Post subject:
There is always a container. The sentence refers to a lack of a Java EE container as referenced in the specification, so you will always get an OS process executing something.

If the client shall not execute the jar file, you need container such as tomcat, jetty,netty, etc.


I am able to deploy a .jar file and run it directly without a container which would make this deployment containerless. What I am looking for are the parameters to point apache to my deployed .jar file. The .jar file can be accessed by "Browse to http://localhost:8080" however, we use apache as the front end and I am unable to figure out the proxy settings to point apache to the file.

Any help is greatly appreciated!
Back to top
airforceboricua



Joined: 19 Sep 2014
Posts: 4
Location: Austin, TX

PostPosted: Wed 24 Sep '14 18:57    Post subject: Reply with quote

You can mark this as solved.

Here are the parameters I was messing around with and couldn't quite get them to work correctly but now I they are working.


Add these to your /etc/apache2/sites-enabled/'site'

ProxyPass / http://localhost:8080/
ProxyPassReverse / http://localhost:8080/
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Wed 24 Sep '14 21:42    Post subject: Reply with quote

I wonder how a reverse proxy makes it container less... Since there is a second server on port 8080...
Back to top
airforceboricua



Joined: 19 Sep 2014
Posts: 4
Location: Austin, TX

PostPosted: Wed 24 Sep '14 21:56    Post subject: Reply with quote

Good question.

We use the Spring Framework to deploy code anywhere a JVM runs. http://spring.io/

The .jar file is deployed then we run a command that explodes the file giving a web browser or apache access to application. We don't have any middleware installed and thus, it's container-less. Smile
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Wed 24 Sep '14 22:49    Post subject: Reply with quote

I have to look into it. So what runs on port 8080?
Back to top


Reply to topic   Topic: Settings for Apache to Proxy to containerless java.jar View previous topic :: View next topic
Post new topic   Forum Index -> Apache