rash111
rash111

Reputation: 1317

nginx service won't start after reboot AWS Linux server

A few weeks ago I configured an ec2 server on AWS and database is on RDS and I use nginx as web server. When i reboot server from the AWS console my nginx wont restart automatically. I did this using service nginx start command.

Is there any way to configure nginx server, So it restarted when i reboot my ec2 instance

Upvotes: 9

Views: 5373

Answers (1)

Shubhangi
Shubhangi

Reputation: 2254

You may configure nginx to start automatically on system boot using below command.

 #chkconfig nginx on

Once you run above command, nginx will be always started whenever system boots.

You may check , if service is configured to start automaticaly on system boot using below command.

# chkconfig nginx --list

You may disable service auto start using below command

# chkconfig nginx off

Upvotes: 23

Related Questions