0

我有这样的虚拟主机:

NameVirtualHost *:80
<VirtualHost *:80>        
    ServerName  local.testing.com    
     DocumentRoot "/Users/myname/Sites/myapp"  
    DirectoryIndex index.html
     <Directory /Users/myname/Sites/myapp>   
        Options Indexes FollowSymLinks Includes ExecCGI
        AllowOverride All
        Order Allow,Deny
        Allow From All
    </Directory>    
</VirtualHost>

热点文件

127.0.0.1   localhost
127.0.0.1   local.testing.com
::1             localhost 

启用此虚拟主机后,我无法通过 http 访问 xampp/htdocs 下的任何站点。但它们可以通过 https 访问

当我访问 localhost 它显示目录列表:"/Users/myname/Sites"

请帮我解决这个问题,

提前致谢

4

1 回答 1

0

所以问题是我们需要一个用于localhost e的虚拟主机。g喜欢这个 SOQ

<VirtualHost *:80>
   DocumentRoot "/Applications/XAMPP/xamppfiles/htdocs"
   ServerAlias localhost
   ServerName localhost
</VirtualHost>
于 2012-11-27T10:22:56.627 回答