How to reload apache configuration for site without restarting apache

I edited the AllowOverride variable for one of my sites in a site-support directory. How to reload a new configuration without restarting apache? Is it possible?

+78
apache2
Nov 25 '11 at 13:52
source share
4 answers

should be possible with the command

sudo /etc/init.d/apache2 reload 

hope that helps

+116
Nov 25 '11 at 1:59 a.m.
source share

another way:

 sudo service apache2 reload 
+75
Jun 22 '13 at 4:08
source share

Do

 apachectl -k graceful 

Check this link for more information: http://www.electrictoolbox.com/article/apache/restart-apache/

+13
Jul 14 2018-12-12T00:
source share

Updated for Apache 2.4 for non-system (e.g. CentOS 6.x, Amazon Linux AMI) and systemd (e.g. CentOS 7.x):

There are two ways to reload the apache configuration, depending on what you want to do with the current threads, either advise you to exit standby mode or kill them directly.

Note that Apache recommends using apachectl -k as a command, and for systemd, the command is replaced with httpd -k

apachectl -k graceful or httpd -k graceful

Apache will report that its threads exit standby mode, and then apache reloads the configuration (it does not exit itself), which means that the statistics are not reset.

apachectl -k restart or httpd -k restart

This is like stopping because the process destroys the threads, but then the process reloads the configuration file rather than killing itself.

Source: https://httpd.apache.org/docs/2.4/stopping.html

0
Aug 31 '17 at 5:19
source share



All Articles