trap INT and TERM signals to gracefully stop web server