Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

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
share|improve this answer
    
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 2:54
    
so I tried localhost again, but this time with adding a trailing slash: "ProxyPass / localhost:8080/rtrSite/"; and that does the trick –  Jerry Skidmore Jun 11 '13 at 4:08
    
That's good news. How about with the full URL and the trailing slash? –  Bill Weiss Jun 11 '13 at 4: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 4:50
    
I meant realtimerater:8080/rtrSite/ . Either way, glad it worked! –  Bill Weiss Jun 11 '13 at 18:44
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.