PHP-curl默认情况下不调用index.PHP页面

PHP-curl默认情况下不调用index.PHP页面,php,curl,Php,Curl,我使用curl从中获取数据 现在我只是想知道,为什么默认情况下我没有得到index.php页面的数据 我的命令行是- curl 'http://my_example_domain.com' 注意-如果我在末尾加上斜杠,我会得到数据- curl 'http://my_example_domain.com/' web服务器未配置为将index.php显示为默认索引文档。在Apache中,这是通过添加以下内容来配置的: DirectoryIndex index.php 到VirtualH

我使用curl从中获取数据

现在我只是想知道,为什么默认情况下我没有得到index.php页面的数据

我的命令行是-

curl 'http://my_example_domain.com'
注意-如果我在末尾加上斜杠,我会得到数据-

curl 'http://my_example_domain.com/'    

web服务器未配置为将index.php显示为默认索引文档。在Apache中,这是通过添加以下内容来配置的:

DirectoryIndex index.php
到VirtualHost或目录配置项:

<Directory /var/www/>
    DirectoryIndex index.php
    ...
</Directory>

DirectoryIndex.php
...

这可能是由于web服务器的配置方式造成的