Return-Path: X-Original-To: apmail-httpd-users-archive@www.apache.org Delivered-To: apmail-httpd-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4A19510306 for ; Thu, 13 Feb 2014 13:14:04 +0000 (UTC) Received: (qmail 23614 invoked by uid 500); 13 Feb 2014 13:14:00 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 23586 invoked by uid 500); 13 Feb 2014 13:14:00 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 23571 invoked by uid 99); 13 Feb 2014 13:13:59 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Feb 2014 13:13:59 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,NORMAL_HTTP_TO_IP,RCVD_IN_DNSWL_LOW,SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of thomas.r.w.eckert@gmail.com designates 209.85.216.170 as permitted sender) Received: from [209.85.216.170] (HELO mail-qc0-f170.google.com) (209.85.216.170) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Feb 2014 13:13:53 +0000 Received: by mail-qc0-f170.google.com with SMTP id e9so18059400qcy.1 for ; Thu, 13 Feb 2014 05:13:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=AU0aNRYDH+iW/521Y/hv+DwF6B8gHnCyuJfKwnXUiV8=; b=X5Jf4vT3vE9A7rX97iAo5KxmGTm7eRCcdSLjNwEiSOgRkPpyJRXVkN/NrmoANWdG5E seuLyiBXUOEodDPLZ1Nfp99wOMf/jODKKj9ybXoj1aAzLEGGWo3Qk0M2BtDwVho/eZs4 i5Z2cFHnatNy/2JAfnix1SwDosSMVdmHk0UNZdFlJ00EgPRQtR+hEqWDeGhFlRuxGs+c C3OsmJaLleWGNyWoX7hmFv/yiOrejtgdqwZ0qCvPF4HYxJTj+uaIRr4DWGaHfq3DrjSX OrgA7l9c7YbNvThJc/DgIfwgclg7obD2LkrueDBzyD+eusjVSIRImEXlKRDPXTzDfUw6 oJLQ== MIME-Version: 1.0 X-Received: by 10.229.139.199 with SMTP id f7mr2414181qcu.2.1392297212320; Thu, 13 Feb 2014 05:13:32 -0800 (PST) Received: by 10.96.133.166 with HTTP; Thu, 13 Feb 2014 05:13:32 -0800 (PST) In-Reply-To: References: <52F8BEF0.9020104@gmail.com> <52F8DAD9.5040600@gmail.com> Date: Thu, 13 Feb 2014 14:13:32 +0100 Message-ID: From: Thomas Eckert To: users@httpd.apache.org Content-Type: multipart/alternative; boundary=001a11c3e454c324fc04f249744c X-Virus-Checked: Checked by ClamAV on apache.org Subject: Re: [users@httpd] port redirecting mapping --001a11c3e454c324fc04f249744c Content-Type: text/plain; charset=ISO-8859-1 The problem with your vhost is that it responds to requests on port 80 and if a request hits your server on port 3030 that vhost is simply not used. That's what ** does. Can't help you with the Rewrite stuff, I've kept my distance from it so far. You would need someone else to look over that, in case you still wanted to use it. On Thu, Feb 13, 2014 at 11:24 AM, Varun Bhuvanendran < varun.bhuvanendran@gmail.com> wrote: > Thomas > This was what i am looking for. Thnaks thomas. > what i was trying to do is, allow access to *http://domain_name > *, > if a request like *http://domain_name:3030 *comes > it should be > redirected/mapped to another link. From the above help i could > redirect a request with :3030 to http://domain_name > > I tried the *RewriteRule *with the intention to replace the :3030 with 80 > from the url* http://domain_name:3030 * like this > ** > > > *RewriteEngine on RewriteCond %{QUERY_STRING} ^(.*):3030(.*)$ > RewriteRule ^(.*)$ $%?:80% [L,R=301]* > ** > this seems not working. Is there any syntax error or something. Does this > rewrite part be inside <*VirtualHost *:3030*> ... <*/VirtualHost*> > > > > On Thu, Feb 13, 2014 at 3:16 PM, Thomas Eckert < > thomas.r.w.eckert@gmail.com> wrote: > >> I'm confused as to what your setup and intention is. From your original >> message I assumed you were talking about a "normal" server but your >> configuration example looks like a >> reverse proxy. Also, I assumed you wanted requests to >> http://domain_name:3030/ to be redirected but then you said *all* >> requests to port 3030. >> >> Does this suit your problem ? >> >> Listen 10.10.10.10:3030 http >> >> ServerName my_redirect_host >> Redirect permanent / http://domain_name/ >> >> >> >> On Mon, Feb 10, 2014 at 2:57 PM, varun wrote: >> >>> I am trying to redirect a link with a port number to another link. I >>> had tried this with the intention >>> that all requests ending with :3030/ should be mapped to >>> http://domain_name/ >>> >>> * * >>> * Order allow,deny* >>> * Allow from all* >>> * * >>> * ProxyPass :3030/ http://domain_name/ * >>> * ProxyPassReverse :3030/ http://domain_name/ * >>> This is not working, as a request like http://domain:3030 is not >>> redirecting. >>> >>> But when i tries >>> ProxyPass / http://domain_name:3030/ >>> ProxyPassReverse / http://domain_name:3030/ >>> A request like this *http://domain_name * redirects >>> to *http://domain_name:3030 * >>> >>> Also tries "Redirect" >>> *Redirect :3030 http://domain_name * >>> >>> rewrite_module is enabled. >>> >>> Is there any config error or the approach is bad. >>> >>> >>> On Monday 10 February 2014 06:21 PM, Thomas Eckert wrote: >>> >>> Assuming you have a working config for a server/vhost on >>> domain_name:3030, then how about >>> Redirect permanent / http://domain_name:3000/ >>> ? See http://httpd.apache.org/docs/current/mod/mod_alias.html#redirectand friends. >>> >>> "Restricted" access is a bit vague but >>> http://httpd.apache.org/docs/current/howto/access.html is a good start. >>> >>> >>> >>> On Mon, Feb 10, 2014 at 12:58 PM, varun wrote: >>> >>>> Is it possible to redirect a request for one port to another one. >>>> Say a request like *http://domain_name:3030 *be accepted and >>>> redirected/mapped, so that the server should be able to process the >>>> request like* http://domain_name:3000 *. And >>>> a direct request like *http://domain_name:3000 >>>> * >>>> should be restricted. >>>> Is there any modules, directive in apache. I am new to apache. On >>>> Ubuntu 12.04. >>>> >>> >>> >>> -- >>> kind regards >>> varun >>> >> >> > > > -- > kind regards > varun > > --001a11c3e454c324fc04f249744c Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
The problem with your vhost is that it responds to re= quests on port 80 and if a request hits your server on port 3030 that vhost= is simply not used. That's what=A0<VirtualHost *:80> does= . Can't help you with the Rewrite stuff, I've kept my distance from= it so far. You would need someone else to look over that, in case you stil= l wanted to use it.


O= n Thu, Feb 13, 2014 at 11:24 AM, Varun Bhuvanendran <<= a href=3D"mailto:varun.bhuvanendran@gmail.com" target=3D"_blank">varun.bhuv= anendran@gmail.com> wrote:
Th= omas
This was what i am looking for. Thnaks thomas.
what = i was trying to do is, allow access to http://domain_name ,
if a request like = http://domain_name:3030=A0 comes it should be
redirected/m= apped to another link. From the above help i could
redirect a request w= ith :3030 to http://domain= _name

I tried the RewriteRule with the intention to replace= the :3030 with 80 from the url http://domain_name:3030 like this
<VirtualHo= st *:80>
=A0=A0=A0=A0=A0=A0=A0 RewriteEngine on=A0
=A0=A0=A0 =A0=A0=A0 Rewrit= eCond %{QUERY_STRING} ^(.*):3030(.*)$
=A0=A0=A0 =A0=A0=A0 RewriteRule ^(= .*)$ $%?:80% [L,R=3D301]

</VirtualHost>
t= his seems not working. Is there any syntax error or something. Does this re= write part be inside <VirtualHost *:3030> ... </VirtualH= ost>



<= div class=3D"gmail_quote">On Thu, Feb 13, 2014 at 3:16 PM, Thomas Eckert <thomas.r.w.eckert@gmail.com> wrote:
I'm confused as to= what your setup and intention is. From your original message I assumed you= were talking about a "normal" server but your configuration exam= ple looks like a
reverse proxy. Also, I assumed you wanted requests to http://domain_name:3030/ to be redire= cted but then you said *all* requests to port 3030.

Does this suit your problem ?

L= isten 10.10.10.10:303= 0 http
<VirtualHost *:3030>
=A0 Serve= rName my_redirect_host
=A0 Redirect permanent / = http://domain_name/
</VirtualHost>
<= div>


On Mon, Feb 10, 2014 at 2:57 PM, varun <varun.bhuvanendran@gmai= l.com> wrote:
=20 =20 =20
I am trying to redirect a link with a port number to another link. I had tried this with the intention
that all requests ending with :3030/ should be mapped to http://domain_name/

=A0=A0=A0 <Proxy *>
=A0=A0=A0 =A0=A0=A0 Order allow,deny
=A0=A0=A0 =A0=A0=A0 Allow from all
=A0=A0=A0 </Proxy>
=A0=A0=A0 ProxyPass :3030/
http://domain_name/
=A0=A0=A0 ProxyPassReverse :3030/ http://domain_name/
This is not working, as a request like http://domain:3030 is not redirecting.

But when i tries
=A0=A0=A0 ProxyPass / http://domain_name:3030/
=A0=A0=A0 ProxyPassReverse / http://domain_name:3030/
A request like this http://domain_name redirects to http://domain_name:3030

Also tries "Redirect"
=A0=A0=A0 Redirect :3030 http://domain_name

rewrite_module is enabled.

Is there any config error or the approach is bad.


On Monday 10 February 2014 06:21 PM, Thomas Eckert wrote:
Assuming you have a working config for a server/vhost on domain_name:3030, then how about
=A0 Redirect permanent / http://domain_name:3000/
? See http://httpd.apache.org/docs/curren= t/mod/mod_alias.html#redirect and friends.

"Restricted" access is a bit vague but htt= p://httpd.apache.org/docs/current/howto/access.html is a good start.



On Mon, Feb 10, 2014 at 12:58 PM, varun <varun.bhuvanendran@gmail.com> wrote:
Is it possible to redirect a request for one port to another one.
Say a request like http://domain_name:3030 be accepted and
redirected/mapped, so that the server should be able to process the
request like http://domain_name:3000. And a direct request like http://domain_name:3000
should be restricted.
Is there any modules, directive in apache. I am new to apache. On Ubuntu 12.04.


--
kind regards
varun




--
kind regar= ds
varun
=

--001a11c3e454c324fc04f249744c--