Fortunately is not possible. The only way should be something like this :
Code:
system('echo "/etc/init.d/httpd restart" | at now + 1 minutes');
But hopefully there will be permission problems to not be able to do that.
There are webservers which have built-in web based administration, like Xitami and Abyss. Is possible that Google heard about such module for Apache. I did not.
You could allow the apache user to restart the httpd service by using sudo, I don't know a great deal about the security implications this would have though.
If you used mass virtual hosting or UserDir methods, you wouldn't have to restart apache every time a new account was setup. Your script would just have to create the user and home directory. In the case of mass virtual hosting, the directory would have to be the same as the domain name such as /var/
Inside that would be the DocumentRoot and cgi-bin directories. The script would need to set the permissions. If you use UserDir a directory such as public_html would be created. If you don't use either of these, you should use graceful rather that a hard restart. Restart just bumps people off.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.