It's worth noting, too, that www.server.com can ping localhost: # ping localhost PING localhost (127.0.0.1) 56(84) bytes of data. 64 bytes from localhost (127.0.0.1): icmp_req=1 ttl=64 time=0.037 ms 64 bytes from localhost (127.0.0.1): icmp_req=2 ttl=64 time=0.019 ms ^C --- localhost ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 999ms rtt min/avg/max/mdev = 0.019/0.028/0.037/0.009 ms
So the /etc/hosts file is correct. -j On Tue, Dec 14, 2010 at 15:03, James <[email protected]> wrote: > Yep, still broken without SSL. > > Weird, though: the first time I went to www.server.com/webapp, my > browser was redirected to localhost:8080/webapp. > > The second time I attempted the same address (www.server.com/webapp), > it simply displayed a page indicating: > > Unable to connect > Firefox can't establish a connection to the server at localhost:8080. > > Doh. > > I know I've gotten this working on other servers before. Again, if I > go to www.server.com:8080/webapp (8080 = tomcat), it works. > > -j > > > On Tue, Dec 14, 2010 at 14:31, Tony Zakula <[email protected]> wrote: >> I can look at my setup, but just by your Firefox message, try plugging >> in 127.0.0.1:8080 and see if that makes a difference. Get port 80 >> working before attempting ssl. Sometimes localhost doesn't resolve >> depending on the op system. Let me know if that makes a difference. >> >> Tony Z >> >> On Tue, Dec 14, 2010 at 1:03 PM, James <[email protected]> wrote: >>> 'preciate the response, Tony. >>> >>> I've actually set this up both manually and using the GlassFish wizard >>> (since from Cherokee's point of view, the application can be running >>> on GlassFish or Tomcat and it makes no difference). >>> >>> Unfortunately I'm still not getting this to work as it should. >>> >>> I get an error: Firefox can't establish a connection to the server at >>> localhost:8080. The URL bar still has the address of the remote server >>> that I specified. Something must be wrong with the load balancing >>> itself, or maybe the ability for Cherokee to get the page that Tomcat >>> is serving? >>> >>> I've confirmed that www.server.com:8080 works without issues (i.e., >>> Tomcat is running). Unfortunately the Cherokee HTTP proxy is still not >>> working. >>> >>> Ideas on how to troubleshoot this? >>> >>> -james >>> >>> On Mon, Dec 13, 2010 at 16:22, Tony Zakula <[email protected]> wrote: >>>> Hi James, >>>> >>>> You need to create a http reverse proxy to your Java server with a >>>> remote host of localhost:8080. Do you have a question on the steps? >>>> There are wizards to do that. >>>> >>>> As far as not specifying the app name, I would do that on whatever >>>> Java Server you are using. Make the deploy path "/". >>>> >>>> Hope that helps. >>>> >>>> Tony Z >>>> >>>> >>>> >>>> On Mon, Dec 13, 2010 at 2:22 PM, James <[email protected]> wrote: >>>>> All, >>>>> >>>>> I'm attempting to set up a proxy for a Tomcat application that runs on >>>>> 8080. >>>>> >>>>> To get to the application, you must go to >>>>> http://server.whatever.com:8080/appname >>>>> >>>>> I would like to set Cherokee up so that I can go to >>>>> http*S*://myserver.whatever.com and it'll then proxy everything in the >>>>> backend. >>>>> >>>>> I keep half-getting this to work. Sometimes the page will come up, >>>>> other times it won't. >>>>> >>>>> Here's what my configuration looks like: >>>>> >>>>> vserver!2!document_root = /var/www/docs >>>>> vserver!2!match = wildcard >>>>> vserver!2!match!domain!1 = *.whatever.com >>>>> vserver!2!nick = ldap >>>>> vserver!2!rule!103!handler = proxy >>>>> vserver!2!rule!103!handler!balancer = round_robin >>>>> vserver!2!rule!103!handler!balancer!source!1 = 1 >>>>> vserver!2!rule!103!handler!in_allow_keepalive = 1 >>>>> vserver!2!rule!103!handler!in_preserve_host = 0 >>>>> vserver!2!rule!103!handler!out_preserve_server = 0 >>>>> vserver!2!rule!103!handler!reuse_max = 5 >>>>> vserver!2!rule!103!match = bind >>>>> vserver!2!rule!103!match!bind!1 = 2 >>>>> vserver!2!rule!103!match!bind!2 = 1 >>>>> vserver!2!rule!103!only_secure = 1 >>>>> vserver!2!rule!3!disabled = 1 >>>>> vserver!2!rule!3!document_root = /usr/share/cherokee/themes >>>>> vserver!2!rule!3!handler = file >>>>> vserver!2!rule!3!match = directory >>>>> vserver!2!rule!3!match!directory = /cherokee_themes >>>>> vserver!2!rule!2!disabled = 1 >>>>> vserver!2!rule!2!document_root = /usr/share/cherokee/icons >>>>> vserver!2!rule!2!handler = file >>>>> vserver!2!rule!2!match = directory >>>>> vserver!2!rule!2!match!directory = /icons >>>>> vserver!2!rule!1!handler = common >>>>> vserver!2!rule!1!match = default >>>>> vserver!2!ssl_certificate_file = /localcerts/cert.pem >>>>> vserver!2!ssl_certificate_key_file = /localcerts/key.pem >>>>> source!1!host = 10.255.254.115:8080 >>>>> source!1!nick = ldap >>>>> source!1!type = host >>>>> >>>>> For "source!1!host" I've also configured "127.0.0.1:8080" to no avail. >>>>> >>>>> At the moment NOTHING is working (I had it working before and one of >>>>> my configuration changes broke everything...not sure what I tweaked). >>>>> If I go to https://myserver.whatever.com, I get a blank page. I'm also >>>>> not certain how to troubleshot / debug the proxy and see why it's >>>>> breaking or not working. Is something logged somewhere when the >>>>> sources / proxy is configured? >>>>> >>>>> Here's what I want to do: >>>>> >>>>> - have this working consistently so that Cherokee can proxy all HTTPS >>>>> requests to this webapp >>>>> - I would like to *prevent* a user from having to type the /appname >>>>> after the URL for the application to load >>>>> >>>>> I see in the http reverse proxy handler there are several different >>>>> options available for rewrite -- I'm not sure, however, if I should be >>>>> rewriting the URL, adding to the header, and whether or not I should >>>>> be doing either for the "request" or the "reply." >>>>> >>>>> Any thoughts or ideas would be greatly appreciated. >>>>> >>>>> Thanks! >>>>> -james >>>>> _______________________________________________ >>>>> Cherokee mailing list >>>>> [email protected] >>>>> http://lists.octality.com/listinfo/cherokee >>>>> >>>> _______________________________________________ >>>> Cherokee mailing list >>>> [email protected] >>>> http://lists.octality.com/listinfo/cherokee >>>> >>> >> > _______________________________________________ Cherokee mailing list [email protected] http://lists.octality.com/listinfo/cherokee
