Multiple Websites (Linux)
This topic describes how to add a new channel to an existing installation.
See also Multiple Channels for steps you need to take in the XperienCentral user interface to complete/enhance this process.
In This Topic
Expanding the Directory Structure
For each new channel, the directory structure needs to be expanded so the files from the new channel will have their own place in the total directory structure. In the directory structure below the new directories are depicted in bold.
/vol/www/tomcat-mywebstie/deploy/appBase |
/vol/www.mywebstie/configuration |
/streaming/ |
/system/ |
/web-docs/ |
/work/ |
/mysecondsite/web-docs/cfg |
/upload |
|
/static/ -> ../../docs/static |
/wm/ -> ../../web-docs/wm |
The Unix commands to create this new structure:
cd /vol/www/mywebsite/ mkdir mysecondsite mkdir mysecondsite/web-docs mkdir mysecondsite/web-docs/cfg mkdir mysecondsite/web-docs/upload mkdir mysecondsite/web-docs/upload_mm cd mysecondsite/web-docs ln –s ../../web-docs/static static ln –s ../../web-docs/wm wm cd /vol/www/mywebsite/ chown –R tomcat.www .
Make the New Hostnames Resolvable
The server on which XperienCentral is installed needs to be able to resolve the hostnames that are used for the edit environment and the external environment of XperienCentral. In the example the hostnames are www.mysecondsite.com
and edit.mysecondsite.com
. Add the hostnames used to the file /etc/hosts
if the used hostnames don’t resolve to the right IP address on the server.
Change the Apache Configuration
When adding a new channel to XperienCentral, the configuration of the Apache web server also needs to be changed. In the configuration files the new URLs for the website and its edit environment need to be present. The change is explained for both Apache version 2.0 and version 2.2.
Changes in httpd.conf (Apache 2.0)
For the new channel two new virtual host entries need to be added to the httpd.conf
file. For the external environment of the website consider the following:
<VirtualHost *:80> ServerName www.mysecondsite.com DocumentRoot "/vol/www/mywebsite/mysecondsite/web-docs/" ErrorLog logs/www.mysecondsite.com_error.log CustomLog logs/www.mysecondsite.com_custom.log common <Directory "/vol/www/mywebsite/mysecondsite/web-docs/"> Options Indexes FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory> <IfModule mod_jk.c> JkMount /web/* mywebsite </Ifmodule> <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_URI} !^/web/ RewriteRule ^/(.*)\.htm$ /web/$1.htm [PT,L] </IfModule> </VirtualHost>
The internal edit environment of the new channel also requires the following additions:
<VirtualHost *:80> ServerName edit.mysecondsite.com DocumentRoot "/vol/www/mywebsite/mysecondsite/web-docs/" ErrorLog logs/edit.mysecondsite.com_error.log CustomLog logs/edit.mysecondsite.com_custom.log common <Directory "/vol/www/mywebsite/mysecondsite/web-docs/"> Options Indexes FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory> <Directory "/vol/www/mywebsite/mysecondsite/web-docs/wm/b/"> ExpiresActive ON ExpiresDefault "now plus 10 minutes" Header set Cache-Control "max-age=600" </Directory> <IfModule mod_jk.c> JkMount /web/* mywebsite </Ifmodule> <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_URI} !^/web/ RewriteRule ^/(.*)\.htm$ /web/$1.htm [PT,L] </IfModule> </VirtualHost>
Changes in httpd-vhosts (Apache 2.2)
For each new channel in XperienCentral, two new virtual host entries to httpd-vhosts.conf
are needed. This file is located in the /vol/www/server/conf/extra
directory of Apache. For the external environment of the website add the following:
<VirtualHost *:80> ServerName www.mysecondsite.com DocumentRoot "/vol/www/mywebsite/mysecondsite/web-docs/" ErrorLog logs/www.mysecondsite.com_error.log CustomLog logs/www.mysecondsite.com_custom.log common <Directory "/vol/www/mywebsite/mysecondsite/web-docs/"> Options Indexes FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory> ProxyPass /web/ ajp://localhost:8009/web/ ttl=600 <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_URI} !^/web/ RewriteRule ^/(.*)\.htm$ /web/$1.htm [PT,L] </IfModule> </VirtualHost>
The following is an example of the minimal setup of the virtual host for the internal environment of XperienCentral:
<VirtualHost *:80> ServerName edit.mysecondsite.com DocumentRoot "/vol/www/mywebsite/mysecondsite/web-docs/" ErrorLog logs/edit.mysecondsite.com_error.log CustomLog logs/edit.mysecondsite.com_custom.log common <Directory "/vol/www/mywebsite/mysecondsite/web-docs/"> Options Indexes FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory> <Directory "/vol/www/mywebsite/mysecondsite/web-docs/wm/b/"> ExpiresActive ON ExpiresDefault "now plus 10 minutes" Header set Cache-Control "max-age=600" </Directory> ProxyPass /web/ ajp://localhost:8009/web/ ttl=600 <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_URI} !^/web/ RewriteRule ^/(.*)\.htm$ /web/$1.htm [PT,L] </IfModule> </VirtualHost>
Communicate Technical Details to the Software Developer
The software developer needs the following details from the system administrator:
- Hostname of the website and the edit environment (in the example from this document this would be
www.mysecondsite.com
andedit.mysecondsite.com
); - The
DocumentRoot
of the new website (in the example from this document this would be/vol/www/mywebsite/mysecondsite/web-docs/
).
Request a New configuration.xml
The configuration.xml
contains a list of hostnames which will be supported by XperienCentral. The new hostnames for the new channel have to be present in the configuration.xml
otherwise it’s not possible to create the new channel in XperienCentral.
- The software developer requests from GX a new
configuration.xml
; he or she then communicates the new hostnames that XperienCentral has to support. - After the software developer has received the new
configuration.xml
from GX Software, he or she will send this file to the system administrator.
Process the New configuration.xml
The system administrator saves the new configuration.xml
over the old one. Based on the directory structure in this document, the new configuration.xml
has to be saved to /vol/www/mywebsite/configuration/
.
Create the New Channel within XperienCentral
The software developer can now create the new channel within XperienCentral. XperienCentral has a wizard for creating the new channel. In step 2 of this wizard, technical details are requested, therefore it’s a good idea to gather this information before starting the wizard. The required details are:
Field Name Step 1 | How to Determine the Value of this Field |
Name | The name of the channel. This name is used in the title of the home page and in the title bar of the browser or browser tab. |
Identifier | A unique identifier used to identify the channel internally within XperienCentral. This is a string consisting of letters and numbers (no spaces). |
Based on channel | Select the channel that the new channel will be based upon. The new channel inherits the core configuration of the one it is based on. |
Field Name Step 2 | How to Determine the Value of this Field |
---|---|
Hostname | The hostname of the channel ( |
Generator | The hostname of the edit environment ( |
Default e-mail address | Default address for sending e-mails. |
Folder for uploads | The folder where the uploads will be placed. This is the |
Upload URL | Based on the previous folder name this would be |
Folder for multimedia uploads | Multimedia files (files that are stored within the Content Repository) are stored in the |
Multimedia Upload URL | Based on the previous folder name this would be |
Descriptor folders | These folders contain the presentation JSPs. XperienCentral scans these folders in search for new, changed, or deleted presentations. The folders need to be separated with a semicolon (;). The default value for this property is |
Redirect base directory | The same as the |
With the details from the previous table at hand, perform the following tasks in XperienCentral to create the new channel:
- Log into XperienCentral with a user that has either a developer or administrator role.
- Navigate to Configure > Channel Configuration.
- At the top of this window there is a pull-down named [Select website]. Select the option "<New website>" to create a new website. If this option is not available, then the license doesn’t allow creating any more websites. Contact GX to buy the license for an additional website and to obtain a new
configuration.xml
. - After selecting the "<New website>" option, a wizard appears. Follow the steps in this wizard.
After the successful conclusion of the wizard, a new channel will be created within XperienCentral. This channel contains one page: the home page. Log into the new channel with the Developer or Administrator user and create new users.