[opencms-dev] Mapping domain name to site in opencms

Joe Desbonnet jdesbonnet at gmail.com
Wed Sep 7 19:19:43 CEST 2005


There are a few things to get right -- took me a while the first time. There 
is (1) the Apache http.conf, but also (2) Tomcat (if that's what you are 
using) server.xml and also (3) WEB-INF/config/opencms-system.xml

I've cut and pasted the relevant bits from my config for a domain.


1. My Apache Config:

<VirtualHost *:80>
ServerName oranmore.galway.net <http://oranmore.galway.net>

ServerAdmin joe at galway.net
DocumentRoot "/opt/tomcat/jakarta-tomcat-5.5.9/webapps/ROOT/"
ErrorLog logs/error.log

# Log only non-redirect requests in "normal" log file
SetEnvIf Request_URI "\/opencms\/*" redirect
CustomLog logs/oranmore-access_log common env=!redirect

ProxyPass /opencms/ !
RedirectPermanent /opencms/ http://oranmore.galway.net/

ProxyPass /resources/ !
ProxyPass /export/ !

ProxyPass / http://localhost:8083/opencms/
ProxyPassReverse / http://localhost:8083/opencms/
</VirtualHost>



2. Tomcat conf/server.xml:

<Connector port="8083" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
proxyName="oranmore.galway.net <http://oranmore.galway.net>" proxyPort="80"
useURIValidationHack="false"
enableLookups="false" redirectPort="8443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true" />


3. WEB-INF/config/opencms-system.xml under <sites> tag:

<site server="http://oranmore.galway.net" uri="/sites/Oranmore/" />


Finally restart everything (Apache + Tomcat).



On 9/7/05, Jordan Harrison <jordo at jordoman.com> wrote:
> 
> Thanks Joe. I've set up all the config, but when I hit www.mysite.conm I 
> get the Catalina index.html
> 
> I think the problem is in my Virtual hosts, can you see anything wrong 
> with this?
> 
> <VirtualHost *>
> ServerName www.mysite.com <http://www.mysite.com>
> ServerAdmin jordo at jordoman.com
> DocumentRoot /data/tomcat/webapps/ROOT/
> 
> # Log only non-redirect requests in "normal" log file
> CustomLog /var/apache2/logs/mysite.log common
> 
> # Multi domain configuration: All pages in "/mysite/" are to be served 
> from domain "www.mysite.com <http://www.mysite.com>"
> RedirectPermanent /opencms/ http://www.mysite.com
> 
> ProxyPass / http://localhost:8081/opencms/
> ProxyPassReverse / http://localhost:8081/opencms/
> </VirtualHost>
> 
> 
> Cheers for any pointers
> Jordan
> 
> 
> Joe Desbonnet said:
> > Follow the same instructions as "Running multiple sites on OpenCms". It
> > assumes you will be using Apache for the front end.
> >
> > Joe.
> >
> >
> > On 9/7/05, Jordan Harrison <jordo at jordoman.com> wrote:
> >>
> >> Hi,
> >>
> >> I have set up a few different websites running on OpenCMS. How do I get
> >> OpenCMS to forward requests to the requested
> >> site?
> >>
> >> ie. how can I get...
> >>
> >> www.mywebsite.com <http://www.mywebsite.com> <http://www.mywebsite.com>
> >>
> >> ...to forward to...
> >>
> >> http://www.mywebsite.com/opencms/opencms/sites/mysite/index.html
> >>
> >> Surely there must be a config in OpenCMS that maps the two? Any help 
> much
> >> appreicated.
> >>
> >> (obviously I have my domain names pointing to my server, but currently 
> it
> >> takes me to the catalina index.jsp)
> >>
> >> Cheers
> >> Jordan
> >>
> >>
> >>
> >> _______________________________________________
> >> 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
> >>
> >
> 
> 
> --
> 
> 
> 
> 
> _______________________________________________
> 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/20050907/e102684b/attachment.htm>


More information about the opencms-dev mailing list