Move apache/nginx common stuff to its own script