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 
2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy