Fast Tip #2 – Restart apache without interrupt the current requests(threads) [linux]



Sometimes we need to restart the web server apache in order to reload the new settings, for example, you added some new host config. But we don’t want that the current requests be lost, and we then don’t want that this reload of settings cause problems for the users.

Debian/Ubuntu/Mint:

Reload the settings using the command service

$ sudo service apache2 reload 

RedHat/Centos/Fedora:

Reload the settings using the command service

$ sudo service httpd reload 

For ALL distributions:

Reload the settings using the command apachectl

$ sudo apachectl -k graceful 

Leave a Reply

Your email address will not be published. Required fields are marked *

*

code