Installation

  1. Download the latest stable release and unpack it:

    # Set latest release as of writing this
    LATEST="0.3.0"
    
    # Download latest release
    wget --content-disposition https://github.com/OSC/nginx_stage/archive/v${LATEST}.tar.gz
    
    # Unpack this archive
    tar xzvf nginx_stage-${LATEST}.tar.gz
    
    # Change working directory
    cd nginx_stage-${LATEST}
    
  2. Install this package in default PREFIX=/opt/ood/nginx_stage location:

    sudo scl enable rh-ruby22 -- rake install
    

    Note

    The location of the installation can be changed by altering the PREFIX environment variable:

    sudo scl enable rh-ruby22 -- rake install PREFIX="/tmp/nginx_stage"
    
  3. Configure the nginx_stage installation by modifying the YAML configuration file located at:

    /etc/ood/config/nginx_stage.yml
    

    On a fresh installation you may need to create this file or copy the default file from:

    /opt/ood/nginx_stage/share/nginx_stage_example.yml
    

    You can read Configuration for details on configuration options.

    Note

    In most cases it isn’t necessary to modify the configuration file as the defaults were chosen to work best with most centers.

  4. Confirm that the Apache proxy is running as the user apache. By default nginx_stage will only give permissions to the apache user to access the NGINX Unix domain socket files.

  5. Give the Apache proxy user apache elevated privileges when running nginx_stage by adding a sudo entry as:

    # /etc/sudoers.d/ood
    
    Defaults:apache     !requiretty, !authenticate
    apache ALL=(ALL) NOPASSWD: /opt/ood/nginx_stage/sbin/nginx_stage