Note that there are some explanatory texts on larger screens.

plurals
  1. POjetty via apache mod_proxy
    primarykey
    data
    text
    <p>Using an Apache virtualhost and mod_proxy I want to access a java application (myapp) available in a jetty instance on port 8080.</p> <p>With <code>ProxyPass / localhost:8080/</code> on my apache virtualhost configuration I can access the application running in jetty with www.mydomain.com/myapp but I want the application to be accessed from www.mydomain.com.</p> <p>Trying with <code>ProxyPass / localhost:8080/myapp</code> The application cannot be found because the request becomes www.mydomain.com/myappmyapp/.</p> <p>Then tried with:</p> <pre><code>&lt;Location /&gt; ProxyPass localhost:8080/myapp/ SetEnv force-proxy-request-1.0 1 SetEnv proxy-nokeepalive 1 &lt;/Location&gt; </code></pre> <p>I can access the application but just for the first request. Subsequent requests become www.mydomain.com/myappmyapp/</p> <p>After reading many times wiki.eclipse.org/Jetty/Tutorial/Apache and the apache mod_proxy docs the only way I managed to use the application properly from www.mydomain.com is with the following configuration:</p> <pre><code>&lt;Location /myapp/&gt; ProxyPass localhost:8080/myapp/ SetEnv force-proxy-request-1.0 1 SetEnv proxy-nokeepalive 1 &lt;/Location&gt; &lt;Location /&gt; ProxyPass localhost:8080/myapp/ SetEnv force-proxy-request-1.0 1 SetEnv proxy-nokeepalive 1 &lt;/Location&gt; </code></pre> <p>so the request is forwarded to the jetty application in both cases.</p> <p>I am quite new to apache and jetty and I am pretty sure there is a better and more elegant way of achieving the same result. In fact apache complains saying:</p> <pre><code>[warn] worker localhost:8080/myapp/ already used by another worker </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload