0

In order to use gwan as a web hosting server, how to add/stop/delete a vhost without restarting the whole gwan server?

thanks

Gil
  • 3,279
  • 1
  • 15
  • 25
k.k. lou
  • 1,805
  • 2
  • 13
  • 16

1 Answers1

0

In productions mode (with the daemon mode enabled with -d), force the child to reload the configuration with a simple exit(0); executed from a G-WAN script.

Since G-WAN closes connections gracefully (not loosing HTTP requests), the new child will start with the new settings.

Gil
  • 3,279
  • 1
  • 15
  • 25
  • With the daemon (-d) mode, G-WAN forks a child that will process requests while the parent checks that the child is healthy. If, by running exit(1), you stop the child then the parent will fork again to create another child that will load the new hosts configuration. – Gil Jan 09 '13 at 10:41
  • I did create a restart.c script which only do a exit(1).. Then when I run it, then an another test.c script, here the log ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Linking test.c: No such file or directory ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ But nothing is updated ... – solisoft Jan 29 '13 at 10:39
  • G-WAN v4.2.5 has a workaround for a file system issue that reports seconds in the nanosecond field of stat(), look at: http://gwan.ch/en_timeline.html that may explain why your file was "not found". – Gil Feb 05 '13 at 19:11