[opencms-dev] virtualhost example/tip sought

Siegfried Puchbauer siegfried.puchbauer at gmail.com
Thu Oct 27 20:26:09 CEST 2005


Your vhost config could look something like this:

NameVirtualHost *:80
>
> <VirtualHost *:80>
> ServerName www.company.de <http://www.company.de>
> DocumentRoot e:/Tomcat/tomcat4.1.24/webapps/opencms/
>
> ProxyPass /resources/ ! # Served by apache
> ProxyPass /export/ ! # Served by apache
>
> ProxyPass /opencms/ http://localhost:8080/opencms/ #Your Tomcat Server
> ProxyPassReverse /opencms/ http://localhost:8080/opencms/
>
> RedirectPermanent / http://www.company.de/opencms/opencms/de/
>
> </VirtualHost>
> <VirtualHost *:80>
> ServerName www.company.com <http://www.company.com>
> DocumentRoot e:/Tomcat/tomcat4.1.24/webapps/opencms/
>
> ProxyPass /resources/ ! # Served by apache
> ProxyPass /export/ ! # Served by apache
>
> ProxyPass /opencms/ http://localhost:8080/opencms/ #Your Tomcat Server
> ProxyPassReverse /opencms/ http://localhost:8080/opencms/
>
> RedirectPermanent / http://www.company.de/opencms/opencms/en/
>
> </VirtualHost>
>

2005/10/27, Christoph Kukulies <kuku at physik.rwth-aachen.de>:
>
>
> I have a www-server that resolves to www.company.de<http://www.company.de>and an alias (CNAME)
> that is www.company.com <http://www.company.com>.
>
> At present a javascript redirection in /index.html
> acts like this
>
> <html>
> <head>
> <script language="JavaScript">
> <!--
> function gotoPage()
> {
> var dns1 = company.com <http://company.com>"
> var dns2 = "company.de <http://company.de>"
> var urlloc = location.href
> var loc = urlloc.toLowerCase()
>
> if (loc.indexOf(dns1) != -1)
> location.href="http://www.company.de/opencms/opencms/en/index.htm"
>
> if (loc.indexOf(dns2) != -1)
> location.href="http://www.company.de/opencms/opencms/de/index.htm"
>
> }
> //-->
>
> </head>
>
> <BODY onLoad="gotoPage()">
> </body>
> </html>
>
> This doesn't seem very robot friendly in the sense that my site is
> traversed
> nicely.
>
> I want to replace this by some Virtualhost mechanism in Apache.
> But I can't figure out how.
> I tried with a ReWriteRule ^/.* /opencms/opencms/*
>
> but this ends up in /opencms/opencms not found or something.
> My DocumentRoot is e:/APache/Apache2/htdocs
>
> and
>
> opencms is in
>
> e:/Tomcat/tomcat4.1.24/webapps/opencms/export ...
>
>
> I want to keep the DocumentRoot the same since the existing
> opencms (4.x) installation relies on it.
>
> I'd greatly appreciate any advice.
>
>
> --
> Chris Christoph P. U. Kukulies kukulies (at) rwth-aachen.de<http://rwth-aachen.de>
>
>
>
> _______________________________________________
> This mail is send to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://mail.opencms.org/mailman/listinfo/opencms-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20051027/de0d3d0d/attachment.htm>


More information about the opencms-dev mailing list