Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

newbie : nginx service as non root user

$
0
0
Guys,

Sorry for the long write up, but I have a different problem and see if anyone has done this..



I have a compiled nginx from source code as we have a custom install requirement we run http on 1234 port and https on 5678 port, so we don;t need to run our nginx as root at all


cd /opt/install/nginx-1.11.3

./configure --user=appadmin --group=apps_group --prefix=/opt/nginx --sbin-path=/opt/nginx/sbin/nginx --conf-path=/opt/nginx/conf/nginx.conf --error-log-path=/opt/nginx/logs/nginx-error.log --http-log-path=/opt/nginx/logs/nginx-access.log --pid-path=/opt/nginx/run/nginx.pid --lock-path=/opt/nginx/run/nginx.lock --with-http_ssl_module --with-http_gunzip_module --with-http_gzip_static_module --with-pcre=/opt/install/pcre-8.39 --with-http_sub_module --with-http_v2_module --with-ipv6 --with-openssl=/opt/install/openssl-1.0.2j

make

make install

and all went well till this point,

after we login to our individual account, we do "sudo su - appadmin" account

so all our app related components has to run as appadmin account and we do nto use any ports under 1024 ports at all


so now the problem is

We wanted to run nginx when server is restarted after any maintenance., so we picked up init script from https://www.scalescale.com/tips/nginx/nginx-init-script/


I made all my customconfig file changes and when i do

service nginx stop or service nginx start as appadmin this works fine,

however if I do a server reboot master process is owned by root and rest of all worker process are owned by appadmin, trouble here is we are unable to stop the nginx as appadmin, becasue we do not have any sudo to root privilages, is there any other way to fix this ?


SKola

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>