windows 10上的Apache 2.4.46虚拟主机

windows 10上的Apache 2.4.46虚拟主机,windows,apache,httpd.conf,vhosts,Windows,Apache,Httpd.conf,Vhosts,我在httpd-vhosts.conf中配置了一个虚拟主机,当我在httpd.conf上启用(未注释的)虚拟主机并尝试访问localhost或local中未在v-host中配置的任何链接时,请始终向我显示禁止您没有访问此资源的权限 (httpd vhosts.conf) 在车间中添加此项。测试vhost块: <Directory "C:/Apache24/htdocs/workshop/workshop_app/public"> DirectoryInde

我在httpd-vhosts.conf中配置了一个虚拟主机,当我在httpd.conf上启用(未注释的)虚拟主机并尝试访问localhost或local中未在v-host中配置的任何链接时,请始终向我显示禁止您没有访问此资源的权限

(httpd vhosts.conf)


车间中添加此项。测试
vhost块:

<Directory "C:/Apache24/htdocs/workshop/workshop_app/public">
    DirectoryIndex index.php
    Options Indexes FollowSymLinks ExecCGI Includes
    AllowOverride All
    Require all granted
</Directory>

DirectoryIndex.php
选项索引如下SYMLINKS ExecCGI包括
允许超越所有
要求所有授权

这是否回答了您的问题?我试过了,但问题仍然存在。如果我使用虚拟主机,我无法使用localhost链接,比如(localhost/phpmyadmin)总是返回禁止您没有访问此资源的权限在
httpd.conf
中您是否为
User
Group
设置了正确的值?我没有在httpd.conf中更改此内容,我应该如何配置它?它需要是您的用户名和您所属的主组
    Include conf/extra/httpd-vhosts.conf
<Directory "C:/Apache24/htdocs/workshop/workshop_app/public">
    DirectoryIndex index.php
    Options Indexes FollowSymLinks ExecCGI Includes
    AllowOverride All
    Require all granted
</Directory>