How can I add a new virtual host via Apache without restarting the server?

Abid Momin June 8, 2013
Pinterest Stumbleupon Whatsapp

I am using Centos Linux and configured Apache for multiple virtual host. I have more then 50 websites running on a single Apache server. Now I need to add new virtual host but after changes i have to restart Apache for change affect and that will kill lots of client connections and that i don’t want.

Please tell me any method that works without restarting Apache and brings the new virtual host online.

 

Ads by Google

  1. Abid Momin
    June 10, 2013 at 5:53 am

    Thanks a lot for your reply... This commands works very well...

  2. Bruce Epper
    June 8, 2013 at 7:37 am

    You want to use 'apachectl -k graceful' to do your restart. This will close all children not currently serving requests and restarts them. It also advises all children currently serving requests to exit and restart after the current request has completed. Requests that arrive while the child processes are restarting are queued up by the operating system and will be served after the child processes have restarted. Your clients should not even realize a restart has happened. This process also does not reset your statistics in order to minimize the time required for the restart.