CheatSnip

Related

Start Nginx

nginx

Start the Nginx web server using systemd or SysV.

Stop Nginx

nginx

Stop the running Nginx web server service.

Restart Nginx

nginx

Restart the Nginx service to apply configuration changes or recover from issues.

nginx/reopen-logs

Reopen Nginx Log Files

Reopen log files (e.g., after log rotation)

logs
rotation

Command

sudo nginx -s reopen

Explanation

Forces Nginx to reopen its log files.

Examples

Reopen log files after logrotate

sudo nginx -s reopen

More

Reload Nginx Configuration

nginx

Reload the Nginx service configuration without interrupting connections.

Check Nginx Status

nginx

Display the current running status of the Nginx service.

Test Nginx Configuration

nginx

Test the Nginx configuration for syntax errors

CheatSnip

Lightning-fast access to essential developer commands and code snippets. Search, copy, and master your favorite tools with our comprehensive cheat sheets.

Poorna Prakash

Quick Links

Git CommandsDockerNPMKubernetesYour Favorites

Legal

Terms & ConditionsPrivacy PolicyCookie Preferences

Company

About UsContact

© 2025 CheatSnip. All rights reserved.

Made with ❤️ for developers