Ignore:
Timestamp:
2010-10-29T21:30:10+13:00 (13 years ago)
Author:
sjm84
Message:

The localhost and hostname did not work on the Ubuntu here, but should have been working. It does work IF hostname and localhost are written into the httpd.conf file. To get it to do that, made changes to greenstone 3's server.jar code (Server2.java and Server2Settings.java), and so also regenerated server.jar itself, as well as GS2 scripts and config files (httpd.conf.in files for linux and windows), llssite.cfg.in, glisite.cfg.in and gsicontrol.bat and .sh.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/gsicontrol.sh

    r23134 r23252  
    5656    echo "Enter host IP to allow (127.0.0.1 is included by default):"
    5757    read hostIP ;
     58    echo "Enter hostname or list of hosts to allow (localhost included by default):"
     59    read hosts ;
    5860    echo "Allow external connections [yes/no]:"
    5961    read connection ;   
     
    6163        allowfromall="Allow"
    6264    else
    63     allowfromall="Deny"
     65        allowfromall="Deny"
    6466    fi
    6567
     
    8587    | sed "s@\*\*CONNECTPERMISSION\*\*@$allowfromall@g" \
    8688    | sed "s@\*\*HOST_IP\*\*@$hostIP@g" \
     89    | sed "s@\*\*HOSTS\*\*@$hosts@g" \
    8790    | sed "s@\*\*COLLECTHOME\*\*@$collecthome@g" \
    8891    | sed "s@\*\*GSDLHOME\*\*@$GSDLHOME@g" \
     
    113116    port=`egrep "^portnumber" $configfile | awk -F= '{print $2}'` ;
    114117    hostIP=`egrep "^hostIP" $configfile | awk -F= '{print $2}'` ;
     118    hosts=`egrep "^hosts" $configfile | awk -F= '{print $2}'` ;   
    115119   
    116120    externalaccess=`egrep "^externalaccess" $configfile | awk -F= '{print $2}'` ;
     
    121125    fi
    122126
    123     echo -e "$port\n$hostIP\n$externalaccess" | configure-port-and-connection ;
     127    echo -e "$port\n$hostIP\n$hosts\n$externalaccess" | configure-port-and-connection ;
    124128    if test -e "$GSDLHOME/apache-httpd/$GSDLOS/conf/httpd.conf" ; then
    125129    echo $MONITOR_SUCCESS;
Note: See TracChangeset for help on using the changeset viewer.