# Nginx 检查配置选项

**URL:** <https://www.isharkfly.com/t/nginx/14180>\
**Category:** DevOps\
**Tags:** nginx\
**Created:** [November 1, 2022, 9:49pm UTC](https://www.isharkfly.com/t/nginx/14180 "2022-11-01T21:49:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![honeymoose](https://www.isharkfly.com/user_avatar/www.isharkfly.com/honeymoose/32/20796_2.png) [@honeymoose](https://www.isharkfly.com/u/honeymoose)\
**Post date:** [November 1, 2022, 9:49pm UTC](https://www.isharkfly.com/t/nginx/14180/1 "2022-11-01T21:49:16Z")

</div>

对 Nginx 配置文件进行修改后，如果重启可能会因为配置文件的问题导致启动失败。

检查命令为： `nginx -t`

通过这个命令可以检查配置的状态。

 ![2025-03-28_15-58-15](https://cdn.isharkfly.com/com-isharkfly-www/discourse-uploads/original/3X/1/3/1325e4e94562e837c2af1514e8f4c687607a6884.jpeg)

如果没有问题，显示成功。
