httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Pasher <just...@newmediagateway.com>
Subject Re: [users@httpd] Subdomain to other domain sub
Date Wed, 22 Oct 2008 18:15:16 GMT
Thierry Lavallée wrote:
> I need to set up so that a subdomain looks in a sub folder of ANOTHER 
> DOMAIN on the same machine.
>
> I would need:
> https://media.domain1.com/image.jpg
> to load
> https://www.domain2.com/media/image.jpg
>
> Please note the HTTPS
>
> How can I achieve this?
> thanks! 

I would normally tell you to setup another VirtualHost for 
media.domain1.com <https://media.domain1.com/image.jpg> based upon the 
VirtualHost for www.domain2.com that points the DocumentRoot to 
/path/to/media/dir for www.domain2.com. However, because of the HTTPS 
and completely different domain, you can't do that without causing some 
SSL domain mismatch warnings.

You should be able to do this with a reverse proxy provided by 
mod_proxy. I personally don't use reverse proxies, so my experience is 
very limited, but I don't think there are problems with HTTPS.

<VirtualHost 1.2.3.4:443>
    ServerName media.domain1.com

|    ProxyPassReverse /media/ https://www.domain2.com/media/|
</VirtualHost>

See the documentation for more details.

http://httpd.apache.org/docs/2.2/mod/mod_proxy.html


-- 
Justin Pasher

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