Changeset 20619


Ignore:
Timestamp:
2009-09-17T16:28:21+12:00 (15 years ago)
Author:
ak19
Message:
  1. Changes to get localhost to be recognised on Linux and the hostname to be recognised on Windows. Multiple allowed host values are inserted into the configfile (e.g. llssite.cfg) and these are used in httpd.conf. 2. Fixed errors: the Address Resolution Method part of the GSI dialog should not be deactivated when the Allow External Connections is checked.
Location:
gsdl/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/glisite.cfg.in

    r20603 r20619  
    99start_browser=0
    1010address_resolution_method=2
    11 host=localhost
     11hosts=127.0.0.1 localhost
     12hostIP=127.0.0.1
  • gsdl/trunk/gsicontrol.sh

    r20603 r20619  
    4949
    5050
    51 function _configure-port-and-connection {
    52     test-gsdlhome
     51function configure-port-and-connection {
     52    test-gsdlhome
     53    configfile=$1 ;
     54# if no configfile given, launch it with llssite.cfg. Create it from the template if needed.
     55    if [ "x$configfile" = "x" ]; then
     56    if test ! -e "$GSDLHOME/llssite.cfg" && test -e "$GSDLHOME/llssite.cfg.in" ; then
     57        cp "$GSDLHOME/llssite.cfg.in" "$GSDLHOME/llssite.cfg" ;
     58    fi
     59    configfile="$GSDLHOME/llssite.cfg";
     60    fi ;
     61
     62    if test -e "$configfile" ; then
     63    hostIP=`egrep "^hostIP" $configfile | awk -F= '{print $2}'` ;
     64    if [ "$hostIP" != "127.0.0.1" ] ; then
     65        hostIP="127.0.0.1 $hostIP"
     66    fi
     67    else
     68    hostIP="127.0.0.1"
     69    fi
     70
    5371    echo "Enter port number to use:"
    5472    read port ;
     73    echo "Enter allowed hosts to use ($hostIP localhost <hostname>) separated by spaces:"
     74    read hosts ;
    5575    echo "Allow external connections [yes/no]:"
    56     read connection ;
     76    read connection ;   
    5777    if [ $connection = "yes" ] || [ $connection = "y" ] ; then
    58         allowfrom="all"
    59     else
    60     echo "Enter host (hostname, IP, localhost, 127.0.0.1) to use:"
    61     read host ;
    62     allowfrom=$host
    63     if [ $allowfrom == "localhost" ]; then
    64         allowfrom="127.0.0.1" ;
    65     fi
     78        allowfromall="Allow"
     79    else
     80    allowfromall="Deny"
    6681    fi
    6782
     
    7388    cat "$GSDLHOME/apache-httpd/$GSDLOS/conf/httpd.conf.in" \
    7489    | sed "s@\*\*PORT\*\*@$port@g" \
    75     | sed "s@\*\*CONNECTION\*\*@$allowfrom@g" \
     90    | sed "s@\*\*CONNECTPERMISSION\*\*@$allowfromall@g" \
     91    | sed "s@\*\*HOSTS\*\*@$hosts@g" \
    7692    | sed "s@\*\*GSDLHOME\*\*@$GSDLHOME@g" \
    7793    | sed "s@\*\*APACHE_HOME_OS\*\*@$GSDLHOME/apache-httpd/$GSDLOS@g" \
     
    99115    echo "Configuring the apache webserver..." ;
    100116    port=`egrep "^portnumber" $configfile | awk -F= '{print $2}'` ;
     117    hosts=`egrep "^hosts" $configfile | awk -F= '{print $2}'` ;
    101118   
    102119    externalaccess=`egrep "^externalaccess" $configfile | awk -F= '{print $2}'` ;
     
    105122    else
    106123    externalaccess="no"
    107     host=`egrep "^host" $configfile | awk -F= '{print $2}'` ;
    108     fi
    109 
    110     echo -e "$port\n$externalaccess\n$host" | _configure-port-and-connection ;
     124    fi
     125
     126    echo -e "$port\n$hosts\n$externalaccess" | configure-port-and-connection ;
    111127    if test -e "$GSDLHOME/apache-httpd/$GSDLOS/conf/httpd.conf" ; then
    112128    echo $MONITOR_SUCCESS;
     
    227243    configure-cgi)
    228244    configure-cgi;;
     245    set-port)
     246    configure-port-and-connection;;
    229247    test-gsdlhome)
    230248    test-gsdlhome;;
  • gsdl/trunk/lib/java/server.properties

    r20603 r20619  
    33Server2Settings.URL=Library URL prefix:
    44Server2Settings.ExternalAccess=Allow external connections
     5Server2Settings.AddressResolutionMethod=Address resolution method
    56Server2Settings.ResolveIP=Get local IP and resolve to a name
    67Server2Settings.LocalIP=Get local IP
  • gsdl/trunk/llssite.cfg.in

    r20603 r20619  
    99start_browser=1
    1010address_resolution_method=2
    11 host=localhost
     11hosts=127.0.0.1 localhost
     12hostIP=127.0.0.1
Note: See TracChangeset for help on using the changeset viewer.