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.bat

    r22613 r23252  
    203203FOR /F "tokens=2 delims==" %%G IN ('findstr /R ^portnumber "%configfile%"') do set port=%%G
    204204FOR /F "tokens=2 delims==" %%G IN ('findstr /R ^hostIP "%configfile%"') do set hostIP=%%G
     205FOR /F "tokens=2 delims==" %%G IN ('findstr /R ^hosts "%configfile%"') do set hosts=%%G
    205206FOR /F "tokens=2 delims==" %%G IN ('findstr /R ^externalaccess "%configfile%"') do set allowfromall=%%G
    206207
     
    218219set /p port=Enter port number to use:
    219220set /p hostIP=Enter host IP to allow (127.0.0.1 is included by default):
     221set /p hosts=Enter hostname or list of hosts to allow (localhost included by default):
    220222set /p allowfromall=Allow external connections [yes/no]:
    221223
     
    243245if exist "%GSDLHOME%\apache-httpd\%GSDLOS%\conf\httpd.conf" "%GSDLHOME%\bin\windows\stophttpd.exe" %GS2_APACHE_HTTPD_SIGNAL% SILENT
    244246echo Setting config file to use port %port%
    245 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"
     247type "%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"
    246248echo Type '%0 web-start' to start the web server running on port %port%
    247249echo Done
Note: See TracChangeset for help on using the changeset viewer.