3

I'm looking at hosting a number of small, static websites and have been looking at a few alternatives including G-WAN. At the moment I'm just trying to get a feel for how well each server suits my needs before picking one.

G-WAN seems to do exactly what I want, though I'm running into problems with updating the configuration (by adding new folders) after the server's started. I can't find anything in the documentation or online about this, so I don't know if I'm doing anything dumb, running an unsupported configuration, or whether it's a feature that doesn't exist in G-WAN.

Here's my setup:

G-WAN 3.3.28 64-bit on Ubuntu 12.04.1 LTS.

I have what I think is the required minimal folder structure:

0.0.0.0_80
  #0.0.0.0
    www
  $site.com
    www
  $othersite.com
    www

I startup gwan via (I'm still messing around, so hopefully ):

sudo .\gwan -d

Everything works brilliantly. I add $thirdsite.com/, $thirdsite.com/www/, and $thirdsite.com/www/index.html; then when I try to visit thirdsite.com it gives me the root host (ie it doesn't seem to pick up the changes).

To reload the modified configuration, I have to either do:

sudo .\gwan -k; sudo .\gwan -d

or kill the non-angel process (kill -s 15) to restart the child process.

Can G-WAN reload the host definitions another way? If so, is it something that works out of the box or is there a command that can cycle the server without dropping requests made to other hosts (/is it safe to kill -s 15 on the non-angel process + if so, is there a reliable way to identify the process)? Thanks in advance!

Gil
  • 3,279
  • 1
  • 15
  • 25
CJM
  • 33
  • 2

1 Answers1

1

G-WAN loads the host definitions at startup and does not check them as time goes to reload them dynamically.

To force a reload, you have to stop the child process (when in daemon mode) and v3.9+ keeps the old child alive the time to process any pending request while the new child accepts new connections.

Since stopping the child can also be done from the maintenance script or from a handler or from a servlet by just running exit(0) there is not need for a dedicated command.

Note that when you use kill you can pick the pid file from the gwan directory:

  • the parent process starts with a capital letter: Gwan_xxxx.pid
  • the child process starts with a lowercase letter: gwan_xxxx.pid

That will make your life easier.

Gil
  • 3,279
  • 1
  • 15
  • 25
  • Awesome, that answers my question - being able to kill the process from somewhere else reliably was all I really need. Thanks! – CJM Nov 01 '12 at 07:18