Search code examples
erlangyaws

Loading new yaws configuration file while running yaws


I am using YAWS to serve my remote application. When ever there is a change in yaws.conf file i am restarting the server to make these changes in effect. I don't want to do this, because my application might crash if server is down for more than certain time.

So is there a way to load the new configuration file with out stopping the server, like live code update?


Solution

  • You can use the following command from an interactive shell to reload the Yaws config file without restarting the server:

    yaws --hup --id ID
    

    where the --id ID portion is optional — if you're running multiple Yaws instances, it lets you identify which particular Yaws server you want to reload.