Return-Path: Delivered-To: apmail-hadoop-core-user-archive@www.apache.org Received: (qmail 40150 invoked from network); 14 Nov 2008 00:33:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Nov 2008 00:33:25 -0000 Received: (qmail 72407 invoked by uid 500); 14 Nov 2008 00:33:27 -0000 Delivered-To: apmail-hadoop-core-user-archive@hadoop.apache.org Received: (qmail 72371 invoked by uid 500); 14 Nov 2008 00:33:26 -0000 Mailing-List: contact core-user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: core-user@hadoop.apache.org Delivered-To: mailing list core-user@hadoop.apache.org Received: (qmail 72360 invoked by uid 99); 14 Nov 2008 00:33:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Nov 2008 16:33:26 -0800 X-ASF-Spam-Status: No, hits=4.9 required=10.0 tests=HTML_MESSAGE,SPF_NEUTRAL,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [72.14.220.158] (HELO fg-out-1718.google.com) (72.14.220.158) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Nov 2008 00:32:05 +0000 Received: by fg-out-1718.google.com with SMTP id l26so862030fgb.35 for ; Thu, 13 Nov 2008 16:32:47 -0800 (PST) Received: by 10.187.222.16 with SMTP id z16mr45126faq.58.1226622767502; Thu, 13 Nov 2008 16:32:47 -0800 (PST) Received: by 10.187.172.10 with HTTP; Thu, 13 Nov 2008 16:32:47 -0800 (PST) Message-ID: <623d9cf40811131632r77b0c920v656ea09ac6563b92@mail.gmail.com> Date: Thu, 13 Nov 2008 16:32:47 -0800 From: "Alex Loddengaard" To: core-user@hadoop.apache.org Subject: Re: Web Proxy to Access DataNodes In-Reply-To: <11dfba390811131219q21e142c0jc54623bfd1f95551@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_35578_6788316.1226622767486" References: <11dfba390811131219q21e142c0jc54623bfd1f95551@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_35578_6788316.1226622767486 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline You could also have your developers setup a SOCKS proxy with the -D option to ssh. Then have them install FoxyProxy. The solution you're trying to do will make maintaining access to your datanodes difficult. That is, for each new datanode, you'll have to add a proxy rule to Apache. With the SOCKS setup, FoxyProxy can be configured to use regular expressions, hence proxying all requests to any one of your nodes. Googling for "SOCKS proxy ssh" should give you more info on how to get this up and running. We used this set up for a hack contest we hosted at ApacheCon and it worked well. Alex On Thu, Nov 13, 2008 at 12:19 PM, David Ritch wrote: > Has anyone configured Apache as a reverse proxy to allow access to your > cloud? I'm having trouble doing this. > > I have a cloud. My datanodes are not visible outside the cloud for > security. I'd like to provide some degree of access for my developers, > using a proxy. I have Apache-2.2, and can get part of the way there, but > I'm having trouble with the proxy rules and ports. > > I'm running a name node on NN, and Apache on WS. I'd like to be able to go > to http://WS/NN, and have that map to http://NN:50070/, and show me the > NameNode status. > > I tried the naive configuration of Apache: > > ProxyPass /NN http://NN:50070 > ProxyPassReverse /NN http://NN:50070 > > This maps the first page properly, and gets the redirect to dfshealth. > However, it does not do the reverse remap, and I get > http://WS/dfhshealth.jsp. > > So, I tried the following: > > ProxyPass /NN http://NN > ProxyPassReverse /NN http://NN > > and accessed http://WS/NN:50070/ in my browser. Again, the initial touch > resulted in a successful proxy operation. This time, the rewrite of the > reference succeeded, and my browser tried to access > http://WS/NN:50070/dfshealth.jsp; however, this did not result in a proxy > operation. Instead, my web browser tried to access a local file > /var/www/html/NN:50070. Apparently, it thought that would be a directory, > and dfshealth.jsp would be a file in it. > > So - what am I doing wrong? Is there a reason that I should be using an > entirely different approach? > > Thanks! > > David > ------=_Part_35578_6788316.1226622767486--