Changeset 19250


Ignore:
Timestamp:
2009-04-24T11:50:48+12:00 (15 years ago)
Author:
davidb
Message:

Unix version now allows the web server to be for local-only or external web server connections. Parallel development for Windows Local Library Server

Location:
gsdl/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/GSI-Makefile

    r18851 r19250  
    3737    ./gsicontrol.sh configure-admin
    3838
    39 configure-port:
    40     ./gsicontrol.sh configure-port
    41 
    4239configure-apache:
    4340    ./gsicontrol.sh configure-apache
  • gsdl/trunk/gsicontrol.sh

    r19140 r19250  
    11#!/bin/bash
    22
     3testdone=0
     4
    35function test-gsdlhome {
    4     if test -z "$GSDLHOME" ; then
    5     echo "" ;
    6     echo "Environment variable GSDLHOME not set." ;
    7     echo "  This needs to be set to run this gsicontrol command." ;
    8     echo "  Have you run 'source setup.bash'?" ;
    9     echo "" ;
    10     exit 1
    11     else
    12     echo "Using: " ;
    13     echo "  GSDLHOME = $GSDLHOME" ;
    14     echo "  GSDLOS   = $GSDLOS" ;
    15     fi
    16 }
     6    if [ $testdone == "0" ] ; then
     7        if test -z "$GSDLHOME" ; then
     8        echo "" ;
     9        echo "Environment variable GSDLHOME not set." ;
     10        echo "  This needs to be set to run this gsicontrol command." ;
     11        echo "  Have you run 'source setup.bash'?" ;
     12        echo "" ;
     13        exit 1
     14        else
     15        echo "Using: " ;
     16        echo "  GSDLHOME = $GSDLHOME" ;
     17        echo "  GSDLOS   = $GSDLOS" ;
     18        fi
     19    testdone=1
     20    fi
     21
    1722
    1823function configure-cgi {
     
    4348}
    4449
    45 function configure-port {
     50
     51function _configure-port-and-connection {
    4652    test-gsdlhome
    4753    echo "Enter port number to use:"
    4854    read port ;
     55    echo "Allow external connections [yes/no]:"
     56    read connection ;
     57    if [ $connection = "yes" ] || [ $connection = "y" ] ; then
     58        allowfrom="all"
     59    else
     60        allowfrom="127.0.0.1"
     61    fi
     62
    4963    if test ! -z $port ; then
    5064    echo "Port: $port" ;
     
    5468    cat "$GSDLHOME/apache-httpd/$GSDLOS/conf/httpd.conf.in" \
    5569    | sed "s@\*\*PORT\*\*@$port@g" \
     70    | sed "s@\*\*ALLOWFROM\*\*@$allowfrom@g" \
    5671    | sed "s@\*\*GSDLHOME\*\*@$GSDLHOME@g" \
    5772    | sed "s@\*\*APACHE_HOME_OS\*\*@$GSDLHOME/apache-httpd/$GSDLOS@g" \
     
    7994    echo "Configuring the apache webserver..." ;
    8095    port=`egrep "^portnumber" $configfile | awk -F= '{print $2}'` ;
    81     echo $port | configure-port ;
     96
     97    externalaccess=`egrep "^externalaccess" $configfile | awk -F= '{print $2}'` ;
     98    if [ $externalaccess == "1" ] ; then
     99    externalaccess="yes"
     100    else
     101    externalaccess="no"
     102    fi
     103
     104    echo -e "$port\n$externalaccess" | _configure-port-and-connection ;
    82105    if test -e "$GSDLHOME/apache-httpd/$GSDLOS/conf/httpd.conf" ; then
    83106    echo $MONITOR_SUCCESS;
     
    149172    echo "   configure-web [config-filename]"
    150173    echo "   configure-apache [config-filename]"
    151     echo "   configure-port"
    152174    echo "   configure-cgi"
    153175    echo "   test-gsdlhome"
     
    175197    configure-web)
    176198    configure-web $configfile;;
    177     configure-port)
    178     configure-port;;
    179199    configure-apache)
    180200    configure-apache $configfile;;
  • gsdl/trunk/llssite.cfg.in

    r19021 r19250  
    44consolelog=0
    55portnumber=80
     6externalaccess=1
    67autoenter=0
    78browser=3
  • gsdl/trunk/runtime-src/packages/apache-httpd/httpd.conf.in

    r18814 r19250  
    420420     AllowOverride None
    421421     Order allow,deny
    422      Allow from all
     422     Allow from **CONNECTION**
    423423  </Directory>
Note: See TracChangeset for help on using the changeset viewer.