【发布时间】:2017-06-27 00:03:43
【问题描述】:
我正在运行 Apache 2.4 服务器。我有以下脚本:
1 #!/usr/bin/perl
2
3 use strict;
4 use warnings;
5 use Getopt::Std;
6
7 my $build = `curl -s https://myserver.myurl.com/mydir/myscript.pl`;
8 print "$build\n";
此脚本位于 Apache 服务器上。如果我在 apache 服务器上运行这个脚本,它就不起作用。我什么也没回。
如果我在本地运行此脚本,它会按预期工作。它在 apache 服务器上执行我的 script.pl,然后我得到正确的数据。
我在这里可能做错了什么?鼓励任何有助于我调试的信息。
这是我的 apache 配置文件中此目录的配置设置:
ScriptAlias /mydir/ /srv/mydir/
<Directory /srv/mydir/>
Options FollowSymLinks
AllowOverride None
Require all granted
</Directory>
【问题讨论】:
-
你可能没有在服务器上安装 curl。