Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] configure jetty with apache via Mod_Proxy

All you have to do is start Jetty on port 8080 and that simple ProxyPass will work fine.
Are you sure your virtualhost is being used and that no other part of your apache conf is overriding it?

"Does not work" isn't very descriptive.
Is Jetty running?
Are you seeing any errors in your log?
Turn up the log level if that helps:
http://httpd.apache.org/docs/2.2/mod/core.html#loglevel

On Thu, 05 Nov 2009 18:14:12 +0100, Daniele Dellafiore <ildella@xxxxxxxxx> wrote:

On Thu, Nov 5, 2009 at 2:07 AM, Martin Strand
<do.not.eat.yellow.snow@xxxxxxxxx> wrote:
There's a typo:

<VirtualHost *.80>

should probably be

<VirtualHost *:80>

(any IP, port 80)

yep, was this! :)
now no error... but does not work yet.

I tried changing to Allow from all and using domain name instead of
localhost, but nothing change.
I have alsol enabled proxy_http module, nothing, again.

But I have to to anything on the jetty side?

Do you suggest to use the forwarder property, instead of ProxyPreserveHost On?
In fact ProxyPreserveHost On should also be a problem in case I would
like to proxy to a NameVirtualHost, like I will need to do in next
future.


You don't need NameVirtualHost unless you plan to have multiple domain names
with different configurations on the same IP
For example:
http://mydomain.com/   --> localhost:8080/webapp
http://mydomain.co.uk/ --> localhost:8080/other-webapp



On Thu, 05 Nov 2009 00:41:03 +0100, Daniele Dellafiore <ildella@xxxxxxxxx>
wrote:

Hi. I am trying to configure jetty to work with apache following this
instructions:

http://docs.codehaus.org/display/JETTY/Configuring+mod_proxy

target is to make http://mydomain.com/mywebapp answer like the request
has been made to http://mydomain.com:8080/mywebapp being jetty running
on port 8080. A standard situation.

I am using apache 2.2 and jetty 7 (under ubuntu 9.04)

I have installed and activated mod_proxy, then I have configured a new
a new apache site and enabled it with a2ensite.
The new site configuration file have this content:

<VirtualHost *.80>

ProxyRequests Off
ProxyPreserveHost On

<Proxy *>
   Order deny,allow
   Deny from all
   Allow from 174.143.172.196
</Proxy>

ProxyPass /newsletter http://localhost:8080/newsletter
ProxyPassReverse /newsletter http://localhost:8080/newsletter

</VirtualHost>

when I restart apache2, I get:

 [error] (EAI 2)Name or service not known: Could not resolve host name
*.80 -- ignoring!

and the integration does not work. I have tried to follow other guide
to understand what I am missing but withoud success.
I think I have to define a NameVirtualHost but do not exacly where and
how... anyone has experience and can help me?

Thanks.


Back to the top