Tran Nghi's Site  - Make notes and share experience

How to give a user permission to restart apache?

1. Short answer Using visudo, add the following to your sudoers file, replacing username with the proper username: username ALL = /etc/init.d/apache2 If you want to not have to type in a password before you do this, use the following: username ALL = NOPASSWD: /etc/init.d/apache2 After this, the ‘username’ user can execute sudo /etc/init.d/apache2 start…