Ravindra BagaleCourses & study guides मराठी Track your progress

Ravi Sir's Cyber Security Cards › Interview Cards

How do you check a service and restart it safely?

How do you check a service and restart it safely? Check status, test the config , then reload or restart. sudo nginx -t (or apachectl configtest ) first, then sudo service nginx reload . “I always config-test before reload. A blind restart with a broken config takes the site down.” A reload with a b

How do you check a service and restart it safely? Check status, test the config , then reload or restart. sudo nginx -t (or apachectl configtest ) first, then sudo service nginx reload . “I always config-test before reload. A blind restart with a broken config takes the site down.” A reload with a b
How do you check a service and restart it safely? · Download PNG
Read card text

What this card says

Short answer

Check status, test the config, then reload or restart.

Example

sudo nginx -t (or apachectl configtest) first, then sudo service nginx reload.

Say it in the interview

“I always config-test before reload. A blind restart with a broken config takes the site down.”

Why it matters

A reload with a bad config can crash a live site. The test catches the mistake first.

Learn more in the lesson: 46.3 Linux on EC2 Interview Questions

See all Ravi Sir's Cyber Security Cards