Monday, June 29, 2015

centos - Do I need to restart/reload apache when adding a configuration file under /etc/httpd/conf.d



Do you need to restart/reload Apache when adding a configuration file under /etc/httpd/conf.d?



I know that editing the httpd.conf need a restart or a reload but unsure if file placed in the conf.d need apache to get restarted.




Thanks for the help



EDIT: I was under the impression that addition to /conf.d would need a regular/graceful restart but several times configuration files I've added to that directory made an effect without having to restart. This is the reason that led me to ask this question.


Answer



Yes. conf.d files are included in Apache's configuration with a line like:



Include conf.d/*.conf



so changes are only noticed when the main configuration is reloaded. Note you can also use the 'graceful' restart (/etc/init.d/httpd graceful on some, apachectl graceful on others) to reload the configuration without dropping existing connections.


No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...