reload apache from a php script
Posted: 2013/01/11 22:56:13
Hello,
sorry for the maybe dumb question but I'm new to centos 6.
I had a linux vps and an app that uses simple php command:
exec('/etc/init.d/httpd reload');
It worked fine on the vps but now moved to centos 6 and it wont work.
I-ve checked and selinux is disabled, so I'm clueless.
I;ve added
apache ALL=(ALL:ALL) NOPASSWD: ALL
to /etc/sudoers
I know the above may seem something horrible to most of you but I really want apache user to be able to reload httpd.
Any help greatly appreciated.
sorry for the maybe dumb question but I'm new to centos 6.
I had a linux vps and an app that uses simple php command:
exec('/etc/init.d/httpd reload');
It worked fine on the vps but now moved to centos 6 and it wont work.
I-ve checked and selinux is disabled, so I'm clueless.
I;ve added
apache ALL=(ALL:ALL) NOPASSWD: ALL
to /etc/sudoers
I know the above may seem something horrible to most of you but I really want apache user to be able to reload httpd.
Any help greatly appreciated.