You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Jim Bierlein <jb...@protrade.com> on 2007/09/06 20:02:24 UTC
[users@httpd] URL Redirection Question
Hello,
I have looked through the FAQ's and still cannot find the answer to what
has to be a simple question. I want to setup our instance of Apache
(Gentoo-based) to take all requests that come in on the URL
http://our.domain.com:10080 and redirect it to
http://another.machine.com:8080. I have looked through the mod-proxy
and the mod-rewrite and am just confusing myself more.
Any help would be greatly appreciated.
Thank you,
Jim
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] URL Redirection Question
Posted by Chris Arnold <ca...@electrichendrix.com>.
>try with redirect (and VirtualHost if needed)
><VirtualHost *:10080>
>ServerName our.domain.com:10080
>RedirectPermanent / http://another.machine.com:8080
></VirtualHost>
We are trying to do the samething with apache 2.2.3 on SLES10 SP1. I have config'ed a vhost.conf, like so:
<VirtualHost *:8080>
ServerAdmin webmaster@dummy-host.example.com
ServerName host.domain.com
RedirectPermanent / http://host.domain.com:8080
We have some users that don't type in the port number;therefore, we need host.domain to redirect to host.domain.com:8080. The servername is the same as redirectpermanent just with a different port. This also brings up another question: as you move along in the vhost conf, you find DocumentRoot /srv/www/vhosts/dummy-host.example.com. This redirectpermanent is a different machine than the one with apache2 on it. Does this matter and if so, how do i handle this? Any ideas?
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] URL Redirection Question
Posted by Bj <bj...@gmail.com>.
try with redirect (and VirtualHost if needed)
<VirtualHost *:10080>
ServerName our.domain.com:10080
RedirectPermanent / http://another.machine.com:8080
</VirtualHost>
Or with Rewrite
RewriteEngine On
RewriteCond %{HTTP_HOST} our.domain.com [NC]*
*RewriteRule /(.*) http://another.machine.com:8080/$1 [L,R=301]
--
Bj
On 9/6/07, Jim Bierlein <jb...@protrade.com> wrote:
>
> Hello,
>
> I have looked through the FAQ's and still cannot find the answer to what
> has to be a simple question. I want to setup our instance of Apache
> (Gentoo-based) to take all requests that come in on the URL
> http://our.domain.com:10080 and redirect it to
> http://another.machine.com:8080. I have looked through the mod-proxy
> and the mod-rewrite and am just confusing myself more.
>
> Any help would be greatly appreciated.
>
> Thank you,
>
> Jim
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
>
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>