Index: /main/trunk/greenstone2/glisite.cfg.in
===================================================================
--- /main/trunk/greenstone2/glisite.cfg.in	(revision 23251)
+++ /main/trunk/greenstone2/glisite.cfg.in	(revision 23252)
@@ -10,2 +10,3 @@
 address_resolution_method=2
 hostIP=
+hosts=
Index: /main/trunk/greenstone2/gsicontrol.bat
===================================================================
--- /main/trunk/greenstone2/gsicontrol.bat	(revision 23251)
+++ /main/trunk/greenstone2/gsicontrol.bat	(revision 23252)
@@ -203,4 +203,5 @@
 FOR /F "tokens=2 delims==" %%G IN ('findstr /R ^portnumber "%configfile%"') do set port=%%G
 FOR /F "tokens=2 delims==" %%G IN ('findstr /R ^hostIP "%configfile%"') do set hostIP=%%G
+FOR /F "tokens=2 delims==" %%G IN ('findstr /R ^hosts "%configfile%"') do set hosts=%%G
 FOR /F "tokens=2 delims==" %%G IN ('findstr /R ^externalaccess "%configfile%"') do set allowfromall=%%G
 
@@ -218,4 +219,5 @@
 set /p port=Enter port number to use:
 set /p hostIP=Enter host IP to allow (127.0.0.1 is included by default):
+set /p hosts=Enter hostname or list of hosts to allow (localhost included by default):
 set /p allowfromall=Allow external connections [yes/no]:
 
@@ -243,5 +245,5 @@
 if exist "%GSDLHOME%\apache-httpd\%GSDLOS%\conf\httpd.conf" "%GSDLHOME%\bin\windows\stophttpd.exe" %GS2_APACHE_HTTPD_SIGNAL% SILENT
 echo Setting config file to use port %port%
-type "%GSDLHOME%\apache-httpd\%GSDLOS%\conf\httpd.conf.in" | %_sed% "s@\*\*PORT\*\*@%port%@g" | %_sed% "s@\*\*CONNECTPERMISSION\*\*@%allowfromall%@g" | %_sed% "s@\*\*HOST_IP\*\*@%hostIP%@g" | %_sed% "s@\*\*COLLECTHOME\*\*@%safecollectpath%@g" | %_sed% "s@\*\*GSDLHOME\*\*@%safepath%@g" | %_sed% "s@\*\*APACHE_HOME_OS\*\*@%safepath%\/apache-httpd\/%GSDLOS%@g" > "%GSDLHOME%\apache-httpd\%GSDLOS%\conf\httpd.conf"
+type "%GSDLHOME%\apache-httpd\%GSDLOS%\conf\httpd.conf.in" | %_sed% "s@\*\*PORT\*\*@%port%@g" | %_sed% "s@\*\*CONNECTPERMISSION\*\*@%allowfromall%@g" | %_sed% "s@\*\*HOST_IP\*\*@%hostIP%@g" | %_sed% "s@\*\*HOSTS\*\*@%hosts%@g" | %_sed% "s@\*\*COLLECTHOME\*\*@%safecollectpath%@g" | %_sed% "s@\*\*GSDLHOME\*\*@%safepath%@g" | %_sed% "s@\*\*APACHE_HOME_OS\*\*@%safepath%\/apache-httpd\/%GSDLOS%@g" > "%GSDLHOME%\apache-httpd\%GSDLOS%\conf\httpd.conf"
 echo Type '%0 web-start' to start the web server running on port %port%
 echo Done
Index: /main/trunk/greenstone2/gsicontrol.sh
===================================================================
--- /main/trunk/greenstone2/gsicontrol.sh	(revision 23251)
+++ /main/trunk/greenstone2/gsicontrol.sh	(revision 23252)
@@ -56,4 +56,6 @@
     echo "Enter host IP to allow (127.0.0.1 is included by default):"
     read hostIP ;
+	echo "Enter hostname or list of hosts to allow (localhost included by default):"
+    read hosts ;
     echo "Allow external connections [yes/no]:"
     read connection ;    
@@ -61,5 +63,5 @@
         allowfromall="Allow"
     else
-	allowfromall="Deny"
+        allowfromall="Deny"
     fi
 
@@ -85,4 +87,5 @@
 	| sed "s@\*\*CONNECTPERMISSION\*\*@$allowfromall@g" \
 	| sed "s@\*\*HOST_IP\*\*@$hostIP@g" \
+	| sed "s@\*\*HOSTS\*\*@$hosts@g" \
 	| sed "s@\*\*COLLECTHOME\*\*@$collecthome@g" \
 	| sed "s@\*\*GSDLHOME\*\*@$GSDLHOME@g" \
@@ -113,4 +116,5 @@
     port=`egrep "^portnumber" $configfile | awk -F= '{print $2}'` ;
     hostIP=`egrep "^hostIP" $configfile | awk -F= '{print $2}'` ;
+    hosts=`egrep "^hosts" $configfile | awk -F= '{print $2}'` ;    
     
     externalaccess=`egrep "^externalaccess" $configfile | awk -F= '{print $2}'` ;
@@ -121,5 +125,5 @@
     fi
 
-    echo -e "$port\n$hostIP\n$externalaccess" | configure-port-and-connection ;
+    echo -e "$port\n$hostIP\n$hosts\n$externalaccess" | configure-port-and-connection ;
     if test -e "$GSDLHOME/apache-httpd/$GSDLOS/conf/httpd.conf" ; then
 	echo $MONITOR_SUCCESS;
Index: /main/trunk/greenstone2/llssite.cfg.in
===================================================================
--- /main/trunk/greenstone2/llssite.cfg.in	(revision 23251)
+++ /main/trunk/greenstone2/llssite.cfg.in	(revision 23252)
@@ -10,2 +10,3 @@
 address_resolution_method=2
 hostIP=
+hosts=
Index: /main/trunk/greenstone2/runtime-src/packages/apache-httpd/httpd.conf.in
===================================================================
--- /main/trunk/greenstone2/runtime-src/packages/apache-httpd/httpd.conf.in	(revision 23251)
+++ /main/trunk/greenstone2/runtime-src/packages/apache-httpd/httpd.conf.in	(revision 23252)
@@ -424,5 +424,5 @@
      Order deny,allow
      **CONNECTPERMISSION** from all
-     Allow from 127.0.0.1 **HOST_IP**
+     Allow from 127.0.0.1 **HOST_IP** **HOSTS** localhost
   </Directory>
 
@@ -433,5 +433,5 @@
      Order deny,allow
      **CONNECTPERMISSION** from all
-     Allow from 127.0.0.1 **HOST_IP** 
+     Allow from 127.0.0.1 **HOST_IP** **HOSTS** localhost 
   </Directory>  
   
@@ -442,4 +442,4 @@
      Order deny,allow
      **CONNECTPERMISSION** from all
-     Allow from 127.0.0.1 **HOST_IP**
+     Allow from 127.0.0.1 **HOST_IP** **HOSTS** localhost
   </Directory>
Index: /main/trunk/greenstone2/runtime-src/packages/apache-httpd/windows-httpd.conf.in
===================================================================
--- /main/trunk/greenstone2/runtime-src/packages/apache-httpd/windows-httpd.conf.in	(revision 23251)
+++ /main/trunk/greenstone2/runtime-src/packages/apache-httpd/windows-httpd.conf.in	(revision 23252)
@@ -489,5 +489,5 @@
      Order deny,allow
      **CONNECTPERMISSION** from all
-     Allow from 127.0.0.1 **HOST_IP**
+     Allow from 127.0.0.1 **HOST_IP** **HOSTS** localhost
   </Directory>
   
@@ -498,5 +498,5 @@
      Order deny,allow
      **CONNECTPERMISSION** from all
-     Allow from 127.0.0.1 **HOST_IP** 
+     Allow from 127.0.0.1 **HOST_IP** **HOSTS** localhost 
   </Directory>
 
@@ -507,4 +507,4 @@
      Order deny,allow
      **CONNECTPERMISSION** from all
-     Allow from 127.0.0.1 **HOST_IP**
+     Allow from 127.0.0.1 **HOST_IP** **HOSTS** localhost
   </Directory>
