How to restart apache from dialplan

Hi, I’m using elastix 2.2, I’m trying to change some apache settings on the fly from the dialplan, I have managed to alter the configuration file (/etc/httpd/conf.d/elastix.conf) but I can not restart apache from the dialplan for the changes to take effect, I tried a php script, this script alters the file and then tries to restart apache, when I launch the script from the dial plan the file does change but apache is not restarted, therefore the changes wont take effect.

I also tried to restart apache directly from the dial plan;

exten => 1605,3,System(/etc/init.d/httpd restart)

also:

exten => 1605,3,System(service httpd restart)

but the same result, apache is not restarted

any help would be appreciated

Reboot your Linux.

I can not reboot the entire server, I just need to restart apache

I can’t really imagine why anyone would want to restart a web server from a telephony application, but basically this is an Apache question, not an Asterisk one. Once you have go t the answer from the Apache side, just shell out out to a script that does whatever is needed (might be as simple as kill -1 on the main Apache pid).