【问题标题】:Apache execute script when reloadingApache在重新加载时执行脚本
【发布时间】:2020-08-21 08:51:29
【问题描述】:

我想在每次重新加载 apache 时运行一个脚本。我可以为自己编写一个包装器,但我们已经有不同的脚本将其作为例程的一部分重新加载,我不想修改它们。有简单的方法吗?

【问题讨论】:

    标签: apache web webserver


    【解决方案1】:

    例如,您可以将 PerlModule 指令添加到您的 httpd.conf 文件中。

    PerlModule Startup
    

    然后在您的 Startup.pm 模块中:

    package Startup;
    use strict;
    use warnings;
    print STDERR "Do something here!\n";
    1;
    

    【讨论】:

      猜你喜欢
      • 2022-01-24
      • 1970-01-01
      • 2012-07-28
      • 1970-01-01
      • 2016-02-16
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多