Hi Mark,

if I understand correctly, domain1 and domain2 are different names for
the same server?!
This type of problem can be solved with a special Tomcat connector
configuration.
In Apache you've defined a virtual host named domain2.example.com. So
in Tomcat you should define a second connector on a different port with
the attributes proxyName="domain2.example.com" and proxyPort="80". You
may copy this from your original ajp connector definition and simply
change the port for the connector and add the attributes. This you
should do for every virtual host defined in your apache config,
allowing Tomcat to return exactly the name of the host, the request was
directed to.
Hope this helps

Best wishes

Werner Greßhoff

Am 01.12.2010 08:16, schrieb Mark Blokpoel:
> Dear all,
>
> I have recently installed Xwiki Enterprise 2.6 on our server (Ubuntu 10), 
> deployed in Tomcat6. For this server we use two domains: domain1.example.com 
> and domain2.example.com. By default Tomcat (and the XWiki) can be accessed 
> via http://domain1.example.com:8080/xwiki/, but for security and easy-access 
> we need the xwiki to be accessed from http://domain2.example.com/xwiki.
>
> This is why Tomcat is fronted by Apache2 using the AJP connector via a proxy 
> pass which is configured in Apache sites-enabled:
>
> <VirtualHost *:80>
>      ServerAdmin r...@example.com
>      DocumentRoot /var/www
>      ServerName domain2.example.com
>
>      <Proxy *>
>       AddDefaultCharset Off
>       Order deny,allow
>       Allow from all
>     </Proxy>
>
>      ProxyPass /xwiki ajp://localhost:8009/xwiki/
>      ProxyPassReverse /xwiki ajp://localhost:8009/xwiki/
> </VirtualHost>
>
> This configuration works, the xwiki can be accessed from domain1 and domain2 
> however there are some problems. The first thing I noticed is that the same 
> wiki has has a different skin on each domain (no xar loaded, no user logged 
> in). Second whereas I can access the login page 
> athttp://domain1.example.com:8080/xwiki/bin/login/XWiki/XWikiLogin, trying to 
> access the login page 
> athttp://domain2.example.com/xwiki/bin/login/XWiki/XWikiLogin fails with an 
> infinite http redirect (redirecting to the same login page, HTTP/1.1 302 
> Moved Temporarily).
>
> My questions are: is this type of configuration supported? If so, why is 
> xwiki generating a redirect on the login page to the login page on domain2 
> and not on domain1? Thank you for the help.
>
> Best,
> Mark
> _______________________________________________
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
>

_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to