Changes between Version 5 and Version 6 of QuickStartServer

Show
Ignore:
Timestamp:
16-03-11 13:05:58 (3 years ago)
Author:
work@…
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • QuickStartServer

    v5 v6  
    149149}}} 
    150150 
    151  
     151== Run GSCF == 
     152You should now be able to start tomcat and run the GSCF application: 
     153 
     154{{{ 
     155root@nmcdsp:~# /etc/init.d/tomcat6 start 
     156Starting Tomcat servlet engine: tomcat6. 
     157root@nmcdsp:~#  
     158}}} 
     159 
     160And check if it is running properly: 
     161 
     162{{{ 
     163root@nmcdsp:~# lynx localhost http://localhost:8080/gscf-0.6.6-nmcdsptest 
     164}}} 
     165 
     166== Set Up Apache to proxy / rewrite request == 
     167As tomcat is running (by default) on 8080, it is not very professional to have your application run on http://test.mysite.com:8080/gscf-0.6.6-nmcdsptest. Instead http://test.mysite.com is preferable. Also it is convenient to be able to add load balancing functionality in case you expect high load. Apache can solve these issues. 
     168 
     169First, make sure Apache loads all modules we require: 
     170{{{ 
     171root@nmcdsp:~# cd /etc/apache2/mods-enabled/ 
     172root@nmcdsp:/etc/apache2/mods-enabled# ln -s ../mods-available/proxy* . 
     173root@nmcdsp:/etc/apache2/mods-enabled# ln -s ../mods-available/rewrite.load . 
     174}}} 
     175 
     176Then create a new virtual host configuration for test.mysite.com and edit it: 
     177{{{ 
     178root@nmcdsp:/etc/apache2/mods-enabled# cd /etc/apache2/sites-available/ 
     179root@nmcdsp:/etc/apache2/sites-available# nano mysite.com_gscf-test.conf 
     180}}} 
     181 
     182Paste the following content into the virtual host configuration: 
     183{{{ 
     184# Apache Virtual Host for GSCF Test Build 
     185# 
     186# Author        Jeroen Wesbeek <J****n.W******@gmail.com> 
     187# Since         20100825 
     188# 
     189# Revision Information: 
     190# $Authoe$ 
     191# $Date$ 
     192# $Rev$ 
     193# 
     194<VirtualHost *:80> 
     195        ServerName test.mysite.com 
     196        ServerAlias test.gscf.mysite.com 
     197 
     198        ErrorLog /var/log/apache2/gscf-test-error.log 
     199        CustomLog /var/log/apache2/gscf-test-access.log combined 
     200 
     201        <IfModule mod_rewrite.c> 
     202                RewriteEngine on 
     203 
     204                # keep listening for the serveralias, but redirect to 
     205                # servername instead to make sure only one user session 
     206                # is created (tomcat will create one user session per 
     207                # domain which may lead to two (or more) usersessions 
     208                # depending on the number of serveraliases) 
     209                # see gscf ticket #321 
     210                RewriteCond %{HTTP_HOST} ^test.gscf.mysite.com$ [NC] 
     211                RewriteRule ^(.*)$ http://test.mysite.com$1 [R=301,L] 
     212 
     213                # rewrite the /gscf-a.b.c-environment/ part of the url                 
     214                RewriteCond %{HTTP_HOST} ^test.mysite.com$ [NC] 
     215                RewriteRule ^/gscf-0.6.6-nmcdsptest/(.*)$ /$1 [L,PT,NC,NE] 
     216        </IfModule> 
     217 
     218        <IfModule mod_proxy.c> 
     219                <Proxy *> 
     220                        Order deny,allow 
     221                        Allow from all 
     222                </Proxy> 
     223 
     224                ProxyStatus On 
     225                ProxyPass / balancer://gscf-cluster/gscf-0.6.6-nmcdsptest/ stickysession=JSESSIONID|jsessionid nofailover=On 
     226                ProxyPassReverse / balancer://gscf-cluster/gscf-0.6.6-nmcdsptest/ 
     227                ProxyPassReverseCookiePath /gscf-0.6.6-nmcdsptest / 
     228 
     229                <Proxy balancer://gscf-cluster> 
     230                        BalancerMember ajp://localhost:8009 
     231                </Proxy> 
     232        </IfModule> 
     233</VirtualHost> 
     234 
     235}}} 
     236and press CTRL-X (and Y) to save 
     237 
     238 
     239 
     240