You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by alex dyas <ad...@twowaytv.co.uk> on 2002/03/18 14:21:36 UTC

Adding / Rewriting HTTP headers on the fly

Hi,

We run Apache in a slightly unconventional environment, clients to our 
servers tend not to be your standard IE, Netscape, Mozilla but TV Set 
Top Boxes.

We have a problem at the moment whereby the requests coming into one of 
our servers are done with HTTP 1.0.  We are planning to change the 
config of our web server to virtual servers (from one standalone).  The 
problem is that HTTP 1.0 as far as I know does not support the "Host" 
header which is necessary for Apache to select the appropriate virtual 
server.  Thus all the requests from the STBs default to the first 
virtual server, and not necessarily the one they should be destined for.

My question is, does anyone know of a good way to add the appropriate 
headers into the requests either before Apache gets them, or to get 
Apache to add them itself? (mod_rewrite?).

I'm thinking maybe Squid is an answer, but I have no experience with it.

thanks,

alex..
-- 
-= alex dyas - webmaster - twowaytv - uk =-


---------------------------------------------------------------------
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
For additional commands, e-mail: users-help@httpd.apache.org


Re: Adding / Rewriting HTTP headers on the fly

Posted by alex dyas <ad...@twowaytv.co.uk>.
Virtual hosts are currently by name, but doing it by IP would indeed 
solve the problem.  I'll definately look into this.

using mod_rewrite instead is a solution I hadn't thought of yet, thanks.

Alex..

Artiom Morozov wrote:
> Hello,
> 
>     While Host header is out of HTTP1.0 standard (afair), it's being 
> used by browsers supporting only HTTP1.0. So far you probably should not 
> care about protocol version. Even if above is not true, you can set one 
> virtual host per IP. Even if previous is also not true ;-) - you can get 
> rid of virtual hosts and use mod_rewrite for selecting proper 
> DocumentRoot using Alias'es. On 2002.03.18 15:21 alex dyas wrote:
> 
>> Hi,
>>
>> We run Apache in a slightly unconventional environment, clients to our 
>> servers tend not to be your standard IE, Netscape, Mozilla but TV Set 
>> Top Boxes.
>>
>> We have a problem at the moment whereby the requests coming into one 
>> of our servers are done with HTTP 1.0.  We are planning to change the 
>> config of our web server to virtual servers (from one standalone).  
>> The problem is that HTTP 1.0 as far as I know does not support the 
>> "Host" header which is necessary for Apache to select the appropriate 
>> virtual server.  Thus all the requests from the STBs default to the 
>> first virtual server, and not necessarily the one they should be 
>> destined for.
>>
>> My question is, does anyone know of a good way to add the appropriate 
>> headers into the requests either before Apache gets them, or to get 
>> Apache to add them itself? (mod_rewrite?).
>>
>> I'm thinking maybe Squid is an answer, but I have no experience with it.
>>
> 
> ---------------------------------------------------------------------
> 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
> For additional commands, e-mail: users-help@httpd.apache.org
> 


-- 
-= alex dyas - webmaster - twowaytv - uk =-


---------------------------------------------------------------------
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
For additional commands, e-mail: users-help@httpd.apache.org


Re: Adding / Rewriting HTTP headers on the fly

Posted by Artiom Morozov <ar...@phreaker.net>.
Hello,

	While Host header is out of HTTP1.0 standard (afair), it's 
being used by browsers supporting only HTTP1.0. So far you probably 
should not care about protocol version. Even if above is not true, you 
can set one virtual host per IP. Even if previous is also not true ;-) 
- you can get rid of virtual hosts and use mod_rewrite for selecting 
proper DocumentRoot using Alias'es. 
On 2002.03.18 15:21 alex dyas wrote:
> Hi,
> 
> We run Apache in a slightly unconventional environment, clients to 
> our servers tend not to be your standard IE, Netscape, Mozilla but TV 
> Set Top Boxes.
> 
> We have a problem at the moment whereby the requests coming into one 
> of our servers are done with HTTP 1.0.  We are planning to change the 
> config of our web server to virtual servers (from one standalone).  
> The problem is that HTTP 1.0 as far as I know does not support the 
> "Host" header which is necessary for Apache to select the appropriate 
> virtual server.  Thus all the requests from the STBs default to the 
> first virtual server, and not necessarily the one they should be 
> destined for.
> 
> My question is, does anyone know of a good way to add the appropriate 
> headers into the requests either before Apache gets them, or to get 
> Apache to add them itself? (mod_rewrite?).
> 
> I'm thinking maybe Squid is an answer, but I have no experience with 
> it.
> 

---------------------------------------------------------------------
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
For additional commands, e-mail: users-help@httpd.apache.org