如何在Apache httpd

我试图从/ etc / httpd / sites-available中的000-default.conf调用shell脚本。

000-default.conf文件的内容为:

    <VirtualHost *:80>
        ServerName localhost
        DocumentRoot /var/www/html/
        CustomLog "| /bin/sh /scratch/user/test.sh" custom_user_tracking
    </VirtualHost>

我的/etc/httpd/conf/httpd.conf添加了以下内容:

    ServerName localhost
    LogFormat "%t [%h] [%m] [%U] [%B] [%b] [%D] [%q] [%s] [%{Referer}i] [%{User-Agent}i]" custom_user_tracking
    IncludeOptional sites-enabled/*.conf
    IncludeOptional sites-available/*.conf

我在/ var / www / html / index.html的内容中保留了一个虚拟html文件:

    <!DOCTYPE html>
    <html>
    <body>
        <h1>Hello World!</h1>
    </body>
    </html>

每当我按下http://localhost:80时,就会调用shell脚本。该shell脚本是可执行文件,它只显示“ Hello World”。

但是尽管未从浏览器触发url http://localhost:80,但脚本会在5s间隔内自动调用。

有人可以在这里帮助我如何禁用Apache httpd中的自动刷新吗?

bbytdcj7c 回答:如何在Apache httpd

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/2984274.html

大家都在问