Restart Nginx than root user?

Hi Team,
root user is must for NGinx restart?
Everytime of restart, prompts for root user than other users. PID’s are
not
getting killed…for the running process with project users.

I tried solution of adding entry to Sudoers file with an path of
executable
script. No luck. Following are the changes made

/ectc/sudoers
%gvp ALL=NOPASSWD: /var/gvp/Nginx/bin/restartNginx #To get rid of Nginx
restart with root user and to attain with gvp user

/var/gvp/Nginx/bin/restartNginx
#! /bin/bash
/bin/kill -HUP cat /var/gvp/Nginx/nginx-1.8.0/logs/nginx.pid

Please review, if above instructions are correct.

And, suggest how project users can be used to restart NGinx…to avoid
manual intervention and dependency of root user always.

Regards,
Maddy

Posted at Nginx Forum:
https://forum.nginx.org/read.php?2,264087,264087#msg-264087

HI,

On 01/25/2016 12:27 PM, smsmaddy1981 wrote:

restart with root user and to attain with gvp user

Regards,
Maddy

Posted at Nginx Forum:
https://forum.nginx.org/read.php?2,264087,264087#msg-264087


nginx mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx
You only need root privileges if you are trying to open a port with a
number lower than 1024 ( might be 1000, been a while! ). You could set
the setuid privileges on the start script, and run it that way…
however, most linux shells will forbid that for security reasons.

Your sudo solution should work fine, and really is the best one. Here’s
an entry on one of my servers to allow user alchemy to manage apache ( I
know, they’re in the stone age! ) on debian wheezy… I just provide
them access to the standard System V init scripts via the service
command

cat /etc/sudoers.d/alchemy

alchemy ALL = NOPASSWD: /usr/sbin/service apache2 *

Steve


Steve H. BSc(Hons) MIITP
http://www.greengecko.co.nz
Linkedin: http://www.linkedin.com/in/steveholdoway
Skype: sholdowa

Hi Steve, Thanks for your email.

And, Is the same solution what I have described in my initiated email.
No
luck there.

Any other suggestions please?

Posted at Nginx Forum:
https://forum.nginx.org/read.php?2,264087,264318#msg-264318

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs