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?
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.
Sign up to join this communityI 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?
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
runlevel
command check and display current runlevel. Now in above example its runlevl 2 so we need to rename killed K20nginx nginx file with start nginx file S20nginx By default linux start all the runlevl script which start with S and Killed which are start with K More info - miteshshah.github.io/linux/basics/system-initialization/…
– Mitesh Shah
Feb 2 '19 at 16:33