【问题标题】:nginx service won't start after reboot AWS Linux server重启 AWS Linux 服务器后,nginx 服务不会启动
【发布时间】:2016-11-14 11:38:24
【问题描述】:

几周前,我在 AWS 上配置了一个 ec2 服务器,数据库在 RDS 上,我使用 nginx 作为 Web 服务器。当我从 AWS 控制台重启服务器时,我的 nginx 不会自动重启。我使用 service nginx start 命令做到了这一点。

有什么方法可以配置 nginx 服务器,所以当我重启我的 ec2 实例时它会重启

【问题讨论】:

    标签: linux nginx amazon-ec2


    【解决方案1】:

    您可以使用以下命令将nginx 配置为在系统启动时自动启动。

     #chkconfig nginx on
    

    一旦你运行了上面的命令,nginx 总是会在系统启动时启动。

    您可以使用以下命令检查服务是否配置为在系统启动时自动启动。

    # chkconfig nginx --list
    

    您可以使用以下命令禁用服务自动启动

    # chkconfig nginx off
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-07-17
      • 2023-03-17
      • 2019-08-23
      • 1970-01-01
      • 2011-04-21
      • 2015-12-29
      • 1970-01-01
      相关资源
      最近更新 更多