httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier ...@ice-sa.com>
Subject Re: [users@httpd] Re: howto query which domain?
Date Tue, 24 Jun 2008 11:10:06 GMT
Something like

SetEnvIf Host "\.([^.]+\.com)$" rdomain=$1

should set an environment variable rdomain to the real domain of the 
request.
Now what you do after that with the rdomain variable...

André


Nino Saturnino Martinez Vazquez Wael wrote:
> Hehe, sure. And thanks for pointing it out.
> 
> I have a site(tomcat) which has several serveraliase's and im trying 
> todo a little specific skinning per serveralias. But todo that I need to 
> be able to see which server the request are comming through,  I've tried 
> using preservehosts on. That works, somewhat, however I get this 
> appended www.domain.com/ZeuzWeb-0.1-SNAPSHOT/ instead of www.domain.com/.
> 
> Heres a snip of my vhost file:
> 
> <VirtualHost *:* 
>  >                                                                               
                                                         
> 
> ServerName beta.domain0.com 
>                                                                                     
                                     
> 
> ServerAlias *.mydomain1.com 
>                                                                                     
                                       
> 
>    ProxyPass /images 
> http://10.0.0.2:8180/ZeuzWeb-0.1-SNAPSHOT/images                                    
                                                
> 
>    ProxyPass / 
> http://10.0.0.2:8180/ZeuzWeb-0.1-SNAPSHOT/                                          
                                                      
> 
>    ProxyPassReverse / 
> http://10.0.0.2:8180/ZeuzWeb-0.1-SNAPSHOT/                                          
                                               
> 
>    ProxyPassReverseCookiePath /ZeuzWeb-0.1-SNAPSHOT 
> /                                                                                   
                 
> 
>    <Proxy 
> *>                                                                               
                                                              
> 
>    Order 
> deny,allow                                                                          
                                                            
> 
>    Allow from 
> all                                                                                 
                                                       
> 
>    
> </Proxy>                                                                      
                                                                        
> 
> RequestHeader set domain 
> Host                                                                                
                                             
> 
>                                                                                     
                                                                     
> 
> </VirtualHost>                     
> The request header  part are actually set, however it always sets it to 
> domain0.com, and never the server alias. So I wanted a method to set the 
> header to either domain0 or mydomain1. If this is possible another 
> better way id be happy not matter what:)
> 
> André Warnier wrote:
>>
>>
>> Nino Saturnino Martinez Vazquez Wael wrote:
>>> Hi I have a vhost which has several serveraliases, how can I check 
>>> for which one is being triggered?
>>>
>>> Something like this:
>>>
>>> if serveralias="myalias" then{
>>>  RequestHeadder add domain "myalias"
>>> }
>>>
>>> I've tried location, but it does not seem to be the thing..
>>>
>>>
>> I kind of presume you are talking about Apache, but
>> like, in what, with what, how, why , where, for what ?
>> Could you be a little more specific ?
>> ;-)
>>
>> ---------------------------------------------------------------------
>> 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
>>
> 

---------------------------------------------------------------------
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