Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/visual-studio-2008/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache虚拟主机显示其工作,但未加载正确的索引_Apache_Osx Mountain Lion_Virtualhost - Fatal编程技术网

Apache虚拟主机显示其工作,但未加载正确的索引

Apache虚拟主机显示其工作,但未加载正确的索引,apache,osx-mountain-lion,virtualhost,Apache,Osx Mountain Lion,Virtualhost,我正在使用这个配置,我的.dev工作正常,但是它的显示工作正常而不是index.php中的内容是否有默认的index.php 马科斯 <Virtualhost *:80> VirtualDocumentRoot "/Users/Jess/Sites/dev/%1/" ServerName vhosts.dev ServerAlias *.dev UseCanonicalName Off LogFormat "%V %h %l %u %t \"%

我正在使用这个配置,我的.dev工作正常,但是它的显示
工作正常
而不是
index.php
中的内容是否有默认的
index.php

马科斯

<Virtualhost *:80>
    VirtualDocumentRoot "/Users/Jess/Sites/dev/%1/"
    ServerName vhosts.dev
    ServerAlias *.dev
    UseCanonicalName Off
    LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
    ErrorLog "/Users/Jess/Sites/dev/vhosts-error_log"

    <Directory "/Users/Jess/Sites/dev/*">
    Options -Indexes FollowSymLinks
    AllowOverride AuthConfig FileInfo
    Order allow,deny
    Allow from all
    </Directory>
</Virtualhost>

VirtualDocumentRoot“/Users/Jess/Sites/dev/%1/”
ServerName vhosts.dev
ServerAlias*.dev
UseCononicalName关闭
日志格式“%V%h%l%u%t\%r\%s%b”vcommon
ErrorLog“/用户/Jess/Sites/dev/vhosts-error_log”
选项-索引跟随符号链接
AllowOverride AuthConfig文件信息
命令允许,拒绝
通融

我相信默认文件是
/Library/WebServer/Documents/index.html
。确保将配置文件添加到
/etc/apache2/httpd.conf
的末尾。大概是这样的:

Include /etc/apache2/users/XXXXX.conf

我不认为它正在阅读这个配置
它可以工作
来自默认的
index.php
文件。该文件通常位于
/var/www/html
文件夹中,也可以是
/Applications/XAMPP/htdocs
。您是XAMPP还是OSX附带的默认apache服务器?