I am using nginx as web server to my Django project.
I am using command
sudo service nginx start/stop/restartto manage nginx server. Now i am using Openresty framework to implement Lua code into nginx server to handle Cache system.
nginx.conf
file.
Requirement : Now i want then when i run sudo service nginx start/stop/restartsystem should call nginx.conf file from Openresty folder(
/usr/local/openresty/nginx/conf/nginx.conf
in place of /etc/nginx/nginx.confM
file.You should go to
cd /etc/init.d
vim nginx.conf
#Edit PATH , DAEMON variable PATH=/usr/local/openresty/nginx/sbin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin DAEMON=/usr/local/openresty/nginx/sbin/nginx
Now when you will run sudo service nginx start/stop/restart it will call nginx.conf file from openresty folder. While /usr/local/openresty is the path where Openresty is installed by default