0

i am trying to proxypass a subdomain xxx.yyy.de to a jetty webapp on yyy.de:8080/app. First i followed the documentation http://wiki.eclipse.org/Jetty/Howto/Configure_mod_proxy which is pretty straight forward i guess. So my virtual host config looks like this:

<VirtualHost *:80>
ServerName xxx.yyy.de

ProxyRequests Off
ProxyPreserveHost On

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

ProxyPass / http://yyy:8080/app/
</VirtualHost>

Doing this results in a 302 forward from apache to: xxx.yyy.de/app/ instead of yyy.de:8080/app/

I tried several different combinations, none of them got me working so i wonder what i am doing wrong here and how to do it right?

I guess some rewriting could solve this, but that seems like the wrong way to me as according to the apache/jetty docs it should be much simpler.

Best Regards, Sven

Edit Well, it seems the problem is i am running a grails app behind this on my jetty. However i solved it by using tomcat with its virtual host feature. Then my config works as expected.

sveri
  • 1,372
  • 1
  • 13
  • 28

1 Answers1

0

It works fine for me in my Ubuntu 12.10 laptop here is what I did:

  1. Create /etc/apache2/available-sites/jetty
  2. sudo a2enmod proxy_http
  3. sudo a2ensite jetty
  4. sudo service apache2 restart

Apache virtual host config file:

      <VirtualHost *:80>
        ServerAdmin webmaster@localhost
        ServerName jetty.valkiria
        ProxyRequests Off
        <Proxy *:80>
          Order deny,allow
          Allow from all
        </Proxy>
        ProxyPass / http://valkiria:8080/
        ProxyPreserveHost On
     <VirtualHost *:80>
E. Celis
  • 717
  • 7
  • 17
  • I guess i cannot mark your answer as solution as it does not work for my specific problem. However it would work too with tomcat and its virtual host. – sveri Apr 03 '13 at 18:42