0

My application is running in Tomcat. If you go to http://realtimerater.com:8080/rtrSite it all works perfectly. I'm trying to get it to work for realtimerater.com.

I tried to use the example that was here:

How to make a URL point to a Tomcat instance?

But it didn't work. So I have the following in my httpd.conf:

<VirtualHost *:80>
   ServerName realtimerater.com
   ServerAlias www.realtimerater.com

   ProxyRequests Off
   ProxyErrorOverride Off
   ProxyPreserveHost On

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

   ProxyPass / http://realtimerater.com:8080/rtrSite
   ProxyPassReverse / http://realtimerater.com:8080/rtrSite

   ErrorLog /var/logs/rtr_errors.log
   CustomLog /var/logs/rtr_access.log common
</VirtualHost>

When I go to realtimerater.com I get this in the /var/logs/rtr_errors.log:

[Mon Jun 10 19:42:10 2013] [error] (111)Connection refused: proxy: HTTP: attempt to connect to 1.2.3.4:8080 (realtimerater.com) failed [Mon Jun 10 19:42:10 2013] [error] ap_proxy_connect_backend disabling worker for (realtimerater.com)

Those are my actual URL's so you can go there and see. I've tried a lot of different combinations and I can't get it working...I'm positive it's something minor that i'm missing, any help would be appreciated!

My setup: tomcat6, httpd2, centos6.

1 Answers1

0

Somewhat arbitrary suggestion, on the basis that it works for me: change your proxypass lines to use localhost instead of realtimerater.com. Thus:

ProxyPass / http://localhost:8080/rtrSite
ProxyPassReverse / http://localhost:8080/rtrSite
Bill Weiss
  • 10,979
  • 3
  • 38
  • 66
  • I had tried that but doing before posting, but doing so redirects...I have it using localhost right now so you can see the behavior, but typing in realtimerater.com will forward you to realtimerater.com/rtrSite – Jerry Skidmore Jun 11 '13 at 02:54
  • so I tried localhost again, but this time with adding a trailing slash: "ProxyPass / http://localhost:8080/rtrSite/" and that does the trick – Jerry Skidmore Jun 11 '13 at 04:08
  • That's good news. How about with the full URL and the trailing slash? – Bill Weiss Jun 11 '13 at 04:10
  • Are you asking about using realtimerater:8080/rtrSite/ in the VirtualHost instead of localhost...? If so, I did do that and it didn't work for me, so I thought I would give it a try with localhost and it came up! – Jerry Skidmore Jun 11 '13 at 04:50
  • I meant realtimerater:8080/rtrSite/ . Either way, glad it worked! – Bill Weiss Jun 11 '13 at 18:44