Whitelabel: Difference between revisions
mNo edit summary |
|||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
= | = White-labeling the Open-Xchange Gui = | ||
=== Introduction === | === Introduction === | ||
Line 5: | Line 5: | ||
In many hosting environments, it is needed that the OX GUI, especially the LOGIN page is branded/whitelabeled to the reseller/customer corporate identity or domain. | In many hosting environments, it is needed that the OX GUI, especially the LOGIN page is branded/whitelabeled to the reseller/customer corporate identity or domain. | ||
There are basically 3 ways | There are basically 3 ways to achieve this: | ||
* Provision the "theme" into each new user via OX APIs like SOAP, RMI or CLT. But then you still need to create a new vhost for each of your | * Provision the "theme" into each new user via OX APIs like SOAP, RMI or CLT. But then you still need to create a new vhost for each of your resellers and you need to copy the whole GUI. This way, you have to modifiy the provisioning and need to copy the OX GUI after each update. | ||
* Create a vhost/domain for every customer/reseller like "reseller.domain.com" and copy the whole OX GUI including all themes to that new vhost. After that is done, you have to modify the "default" theme of the OX GUI. The drawback of that solution is, that you now have multiple copies of the OX GUI, which is very bad regarding seamless updates/upgrades. After each update, you have to copy the GUI again for every domain/reseller you have created a vhost for. | * Create a vhost/domain for every customer/reseller like "reseller.domain.com" and copy the whole OX GUI including all themes to that new vhost. After that is done, you have to modify the "default" theme of the OX GUI. The drawback of that solution is, that you now have multiple copies of the OX GUI, which is very bad regarding seamless updates/upgrades. After each update, you have to copy the GUI again for every domain/reseller you have created a vhost for. | ||
Line 13: | Line 13: | ||
* Use mod_rewrite by Apache to do the work for you based on the domain, the user entered in his browser. With this way, you only have to change the default theme and the GUI will be served from only one directory. This way, you have nearly nothing to do after you have update the OX GUI. | * Use mod_rewrite by Apache to do the work for you based on the domain, the user entered in his browser. With this way, you only have to change the default theme and the GUI will be served from only one directory. This way, you have nearly nothing to do after you have update the OX GUI. | ||
We recommend that you do it via the mod_rewrite module of Apache. It is less | We recommend that you do it via the mod_rewrite module of Apache. It is less painful and offers more options for you. | ||
=== Configuration === | === Configuration === | ||
* You have to modify the | * You have to modify the OX specific vhost of your apache so that the vhost inherits also "mod_rewrite" configurations: | ||
<pre> | <pre> | ||
Line 24: | Line 24: | ||
</pre> | </pre> | ||
On Debian | On Debian Lenny you have to add the above 2 lines to the "<VirtualHost>" section of file: | ||
<pre> | <pre> | ||
Line 31: | Line 31: | ||
Now you have to create a new config file to the main | Now you have to create a new config file to the main Apache configuration which will rewrite all requests from "/themes/default" to "/themes/<FQDN>", where "<FQDN>" will be replaced by the domain the user entered in his browser to access the Open-Xchange GUI. | ||
For Debian Lenny, create file: | For Debian Lenny, create file: | ||
Line 39: | Line 39: | ||
</pre> | </pre> | ||
and add following line to it: | and add the following line to it: | ||
<pre> | <pre> | ||
Line 45: | Line 45: | ||
</pre> | </pre> | ||
Assuming that your users access the OX GUI via "http://webmail.brand.com", you have to copy the "default" theme to "webmail.brand.com" and then modify it | Assuming that your users access the OX GUI via "http://webmail.brand.com", you have to copy the "default" theme to "webmail.brand.com" and then modify it to suit your needs. | ||
<pre> | <pre> | ||
Line 51: | Line 51: | ||
</pre> | </pre> | ||
To make it even more | To make it even more useful, you could now try to modify the mod_rewrite configuration to only rewrite some URls the UI is requesting, like the LOGIN logo or the main logo , which is used in the GUI after logging in etc. This way, you only need to modify 3-4 files and the main part of the GUI will be loaded by the "default" theme. |
Latest revision as of 09:18, 21 December 2010
White-labeling the Open-Xchange Gui
Introduction
In many hosting environments, it is needed that the OX GUI, especially the LOGIN page is branded/whitelabeled to the reseller/customer corporate identity or domain.
There are basically 3 ways to achieve this:
- Provision the "theme" into each new user via OX APIs like SOAP, RMI or CLT. But then you still need to create a new vhost for each of your resellers and you need to copy the whole GUI. This way, you have to modifiy the provisioning and need to copy the OX GUI after each update.
- Create a vhost/domain for every customer/reseller like "reseller.domain.com" and copy the whole OX GUI including all themes to that new vhost. After that is done, you have to modify the "default" theme of the OX GUI. The drawback of that solution is, that you now have multiple copies of the OX GUI, which is very bad regarding seamless updates/upgrades. After each update, you have to copy the GUI again for every domain/reseller you have created a vhost for.
- Use mod_rewrite by Apache to do the work for you based on the domain, the user entered in his browser. With this way, you only have to change the default theme and the GUI will be served from only one directory. This way, you have nearly nothing to do after you have update the OX GUI.
We recommend that you do it via the mod_rewrite module of Apache. It is less painful and offers more options for you.
Configuration
- You have to modify the OX specific vhost of your apache so that the vhost inherits also "mod_rewrite" configurations:
RewriteEngine On RewriteOptions Inherit
On Debian Lenny you have to add the above 2 lines to the "<VirtualHost>" section of file:
/etc/apache2/sites-available/default
Now you have to create a new config file to the main Apache configuration which will rewrite all requests from "/themes/default" to "/themes/<FQDN>", where "<FQDN>" will be replaced by the domain the user entered in his browser to access the Open-Xchange GUI.
For Debian Lenny, create file:
/etc/apache2/conf.d/rewrite_default_theme.conf
and add the following line to it:
RewriteRule v=\w+/themes/default(.*)$ /themes/%{HTTP_HOST}/$1
Assuming that your users access the OX GUI via "http://webmail.brand.com", you have to copy the "default" theme to "webmail.brand.com" and then modify it to suit your needs.
cp -r /var/www/ox6/themes/default /var/www/ox6/themes/webmail.brand.com
To make it even more useful, you could now try to modify the mod_rewrite configuration to only rewrite some URls the UI is requesting, like the LOGIN logo or the main logo , which is used in the GUI after logging in etc. This way, you only need to modify 3-4 files and the main part of the GUI will be loaded by the "default" theme.