Nginx-to Enable Autostart
I Installed the Docker Container in My Ubuntu 13.10. Along with This Nginx Webserver Also Installed. but Every Time I Want to Type This Command Service Nginx...
I installed the docker container in my ubuntu 13.10. Along with this nginx webserver also
installed.But every time i want to type this command
service nginx restart.
so how can i autorun the nginx?
1 Answer
Method 1: Start nginx at ubuntu startup
Check runlevel
^_^[root@easyengine:~]# runlevel
N 2
My ubuntu runlevel is 2 so i'm edit the following file
mv /etc/rc2.d/K20nginx /etc/rc2.d/S20nginx
Now restart the system
Method 2: rc.local
Add following line before the exit 0
service nginx start