Re: Re[users@httpd] direct Issues (Migrating from 1.3 to 2.0)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



One other suggestion was to do this:

RedirectMatch  Permanent /(.*) http://hudson.warpspeed.com.au/hudson/$1

However, that ends up with the infinite loop as well. :-(

Here is a bit from the log:

203.27.78.162 - - [08/Dec/2008:20:16:52 +1100] "GET / HTTP/1.1" 301 330 "-"
"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.18) Gecko/20081029
(CK-IBM) Firefox/2.0.0.1
8"
203.27.78.162 - - [08/Dec/2008:20:16:52 +1100] "GET /hudson/ HTTP/1.1" 301
337 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.18)
Gecko/20081029 (CK-IBM) Firefox/
2.0.0.18"
203.27.78.162 - - [08/Dec/2008:20:16:52 +1100] "GET /hudson/hudson/
HTTP/1.1" 301 344 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
rv:1.8.1.18) Gecko/20081029 (CK-IBM) F
irefox/2.0.0.18"
203.27.78.162 - - [08/Dec/2008:20:16:52 +1100] "GET /hudson/hudson/hudson/
HTTP/1.1" 301 351 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
rv:1.8.1.18) Gecko/20081029 (CK
-IBM) Firefox/2.0.0.18"
203.27.78.162 - - [08/Dec/2008:20:16:52 +1100] "GET
/hudson/hudson/hudson/hudson/ HTTP/1.1" 301 358 "-" "Mozilla/5.0 (Windows;
U; Windows NT 5.1; en-US; rv:1.8.1.18) Gecko/20081
029 (CK-IBM) Firefox/2.0.0.18"
203.27.78.162 - - [08/Dec/2008:20:16:52 +1100] "GET
/hudson/hudson/hudson/hudson/hudson/ HTTP/1.1" 301 365 "-" "Mozilla/5.0
(Windows; U; Windows NT 5.1; en-US; rv:1.8.1.18) Geck
o/20081029 (CK-IBM) Firefox/2.0.0.18"
203.27.78.162 - - [08/Dec/2008:20:16:52 +1100] "GET
/hudson/hudson/hudson/hudson/hudson/hudson/ HTTP/1.1" 301 372 "-"
"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1
8) Gecko/20081029 (CK-IBM) Firefox/2.0.0.18"
203.27.78.162 - - [08/Dec/2008:20:16:52 +1100] "GET
/hudson/hudson/hudson/hudson/hudson/hudson/hudson/ HTTP/1.1" 301 379 "-"
"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:
1.8.1.18) Gecko/20081029 (CK-IBM) Firefox/2.0.0.18"
203.27.78.162 - - [08/Dec/2008:20:16:52 +1100] "GET
/hudson/hudson/hudson/hudson/hudson/hudson/hudson/hudson/ HTTP/1.1" 301 386
"-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-
US; rv:1.8.1.18) Gecko/20081029 (CK-IBM) Firefox/2.0.0.18"
203.27.78.162 - - [08/Dec/2008:20:16:52 +1100] "GET
/hudson/hudson/hudson/hudson/hudson/hudson/hudson/hudson/hudson/ HTTP/1.1"
301 393 "-" "Mozilla/5.0 (Windows; U; Windows NT 5
.1; en-US; rv:1.8.1.18) Gecko/20081029 (CK-IBM) Firefox/2.0.0.18"
203.27.78.162 - - [08/Dec/2008:20:16:52 +1100] "GET
/hudson/hudson/hudson/hudson/hudson/hudson/hudson/hudson/hudson/hudson/
HTTP/1.1" 301 400 "-" "Mozilla/5.0 (Windows; U; Windo
ws NT 5.1; en-US; rv:1.8.1.18) Gecko/20081029 (CK-IBM) Firefox/2.0.0.18"
203.27.78.162 - - [08/Dec/2008:20:16:52 +1100] "GET
/hudson/hudson/hudson/hudson/hudson/hudson/hudson/hudson/hudson/hudson/hudson/
HTTP/1.1" 301 407 "-" "Mozilla/5.0 (Windows; U
; Windows NT 5.1; en-US; rv:1.8.1.18) Gecko/20081029 (CK-IBM)
Firefox/2.0.0.18"
203.27.78.162 - - [08/Dec/2008:20:16:52 +1100] "GET
/hudson/hudson/hudson/hudson/hudson/hudson/hudson/hudson/hudson/hudson/hudson/hudson/
HTTP/1.1" 301 414 "-" "Mozilla/5.0 (Win
dows; U; Windows NT 5.1; en-US; rv:1.8.1.18) Gecko/20081029 (CK-IBM)
Firefox/2.0.0.18"
203.27.78.162 - - [08/Dec/2008:20:16:52 +1100] "GET
/hudson/hudson/hudson/hudson/hudson/hudson/hudson/hudson/hudson/hudson/hudson/hudson/hudson/
HTTP/1.1" 301 421 "-" "Mozilla/5
.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.18) Gecko/20081029 (CK-IBM)
Firefox/2.0.0.18"
203.27.78.162 - - [08/Dec/2008:20:16:52 +1100] "GET
/hudson/hudson/hudson/hudson/hudson/hudson/hudson/hudson/hudson/hudson/hudson/hudson/hudson/hudson/
HTTP/1.1" 301 428 "-" "Mo
zilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.18) Gecko/20081029
(CK-IBM) Firefox/2.0.0.18"


-Chris


Chris Graham wrote:
> 
> 
> 
> awarnier wrote:
>> 
>> Chris Graham wrote:
>>> Hi All.
>>> 
>>> I am in the process of attempting to migrate from Apache 1.3 to 2.0
>>> (well,
>>> actually IBM Http Server that comes with WebSphere 5.1 to 6.1).
>>> 
>>> I have this currently working in the existing 1.3 installation:
>>> 
>>> NameVirtualHost firedragon.warpspeed.com.au:80
>>> 
>>> <VirtualHost firedragon.warpspeed.com.au:80>
>>>     ServerName     firedragon.warpspeed.com.au:80
>>>     CustomLog      logs/firedragon/firedragon.log combined
>>>     ErrorLog       logs/firedragon/firedragon_error.log
>>>     LogLevel       warn
>>> #    Redirect       permanent /
>>> http://firedragon.warpspeed.com.au/firedragon/
>>> 
>>>     ErrorDocument 400
>>> http://inet3.warpspeed.com.au/error/firedragon/400.htm
>>>     ErrorDocument 401 /error/firedragon/401.htm
>>>     ErrorDocument 402
>>> http://inet3.warpspeed.com.au/error/firedragon/402.htm
>>>     ErrorDocument 403
>>> http://inet3.warpspeed.com.au/error/firedragon/403.htm
>>>     ErrorDocument 404
>>> http://inet3.warpspeed.com.au/error/firedragon/404.htm
>>>     ErrorDocument 405
>>> http://inet3.warpspeed.com.au/error/firedragon/405.htm
>>>     ErrorDocument 406
>>> http://inet3.warpspeed.com.au/error/firedragon/406.htm
>>>     ErrorDocument 407
>>> http://inet3.warpspeed.com.au/error/firedragon/407.htm
>>>     ErrorDocument 408
>>> http://inet3.warpspeed.com.au/error/firedragon/408.htm
>>>     ErrorDocument 409
>>> http://inet3.warpspeed.com.au/error/firedragon/409.htm
>>>     ErrorDocument 410
>>> http://inet3.warpspeed.com.au/error/firedragon/410.htm
>>>     ErrorDocument 411
>>> http://inet3.warpspeed.com.au/error/firedragon/411.htm
>>>     ErrorDocument 412
>>> http://inet3.warpspeed.com.au/error/firedragon/412.htm
>>>     ErrorDocument 413
>>> http://inet3.warpspeed.com.au/error/firedragon/413.htm
>>>     ErrorDocument 414
>>> http://inet3.warpspeed.com.au/error/firedragon/414.htm
>>>     ErrorDocument 415
>>> http://inet3.warpspeed.com.au/error/firedragon/415.htm
>>>     ErrorDocument 500
>>> http://inet3.warpspeed.com.au/error/firedragon/500.htm
>>>     ErrorDocument 501
>>> http://inet3.warpspeed.com.au/error/firedragon/501.htm
>>>     ErrorDocument 502
>>> http://inet3.warpspeed.com.au/error/firedragon/502.htm
>>>     ErrorDocument 503
>>> http://inet3.warpspeed.com.au/error/firedragon/503.htm
>>>     ErrorDocument 504
>>> http://inet3.warpspeed.com.au/error/firedragon/504.htm
>>>     ErrorDocument 505
>>> http://inet3.warpspeed.com.au/error/firedragon/505.htm
>>> 
>>> </VirtualHost>
>>> 
>>> 
>>> The redirect is in place so that if anyone comes in on
>>> http://firedragon.warpspeed.com.au they get redirected to
>>> http://firedragon.warpspeed.com.au/firedragon/ which is the root of the
>>> webapp.
>>> 
>>> All of this is working perfectly as expected under 1.3.
>>> 
>>> However, under 2.0(.47) when I have the Redirect in place, it loops:
>>> 
>>> http://firedragon.warpspeed.com.au/firedragon/firedragon/... ad
>>> infinitum.
>>> 
>>> Does anyone have any ideas as to how to solve this? It's got me stumped.
>>>
>> 
>> You probably need to use mod_rewrite instead of the simple "Redirect".
>> 
>> And you will need a "RewriteCond" that will say to NOT redirect in case 
>> the URL already starts with /firedragon.
>> Unfortunately, I don't know this stuff well enough to be sure, but you 
>> could try :
>> 
>>     RewriteCond %{REQUEST_URI} !^/firedragon
>>     RewriteRule ^/(.*)$ /firedragon/$1 [L]
>> 
>> You may want to read here for more details :
>> 
>> http://httpd.apache.org/docs/2.2/rewrite/
>> (or the equivalent in 2.0 docs, but I don't think it has much changed).
>> 
>> Now about your configuration above :
>> I do not remember how it was in 1.3, but in Apache 2.x the usual way of 
>> using the following directives is :
>> 
>> NameVirtualHost *
>> 
>> <VirtualHost *>
>>      ServerName   firedragon.warpspeed.com.au
>> ...
>> </VirtualHost>
>> 
>> unless you have specific reasons to limit this VirtualHost to a specific 
>> server IP address and/or port.
>> The arguments to the NameVirtualHost and VirtualHost must match exactly.
>> For example, if you wanted to limit this only to requests on port 80, 
>> (but all interfaces) you would use:
>> NameVirtualHost *:80
>> <VirtualHost *:80>
>> ..
>> 
> 
> I do. This machine has multiple IP addresses aliased to ip, each of which
> represents a separate web app. So I'm using IP based virtual hosting.
> 
> Thanks for your comments. I'll see what I can do.
> 
> -Chris
> 
> 

-- 
View this message in context: http://www.nabble.com/Redirect-Issues-%28Migrating-from-1.3-to-2.0%29-tp20880100p20892178.html
Sent from the Apache HTTP Server - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux