Skip to content

Instantly share code, notes, and snippets.

@nloyola
Last active October 13, 2015 20:29
Show Gist options
  • Save nloyola/275235d32563e32083fc to your computer and use it in GitHub Desktop.
Save nloyola/275235d32563e32083fc to your computer and use it in GitHub Desktop.

OpenSpecimen notes for CBSR

Web Application

The Web Application runs on Tomcat and is fronted by the Apache Web server.

Installation instructions

  1. Install Apache: in Ubuntu execute the following command on the command line:
    sudo apt-get update
    sudo apt-get install apache2
        
  2. Install mod_jk: To install mod_jk in Ubuntu execute the following command on the command line:
    sudo apt-get install libapache2-mod-jk
        

    This wil also enable the module.

  3. Ensure the following settings are enabled in /etc/apache2/mods-enabled/jk.conf:
    JkWorkersFile /etc/libapache2-mod-jk/workers.properties
    JkLogFile /var/log/apache2/mod_jk.log
    JkLogLevel info
    JkOptions +RejectUnsafeURI
    JkStripSession On
        
  4. Configure the workers properties file:

    Set workers.tomcat_home to point to the OpenSpecimen Tomcat directory.

    workers.tomcat_home=/opt/OpenSpecimen_Evaluation/test
        

    Set workers.java_home to point to your Java JRE.

    workers.java_home=/usr/lib/jvm/java-7-oracle
        
  5. Enable SSL connections on Apache server:
    sudo a2ensite default-ssl.conf
        
  6. Edit the SSL configuration file:
    ServerName __your_server_name_here__
    ServerAlias __your_alias_here__
        

    And add the following line in the <VirtualHost> section:

    JkMount /openspecimen* ajp13_worker
        
  7. Ensure the following line is present in in $TOMCAT_HOME/conf/server.xml file under the Servies tag.
    <Service name="Catalina">
         ...
        <!-- Define an AJP 1.3 Connector on port 8009 -->
        <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
        ...
    </Service>
        
  8. Optional: create a self signed certificate. Use these instructions.
  9. Restart the appache server and start OpenSpecimen:
    sudo service apache2 reload
    cd /opt/OpenSpecimen_Evaluation/test/
    bin/catalina.sh run
        

? Need to enable ssl module on Apache ?

For SSL certificate info see /usr/share/doc/apache2/README.Debian.gz.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment