httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Graham <chr...@warpspeed.com.au>
Subject [users@httpd] Re: Re[users@httpd] direct Issues (Migrating from 1.3 to 2.0)
Date Sun, 07 Dec 2008 19:49:33 GMT



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-tp20880100p20884799.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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message