【发布时间】:2019-09-11 05:56:02
【问题描述】:
对不起,我对这个 Apache 设置非常陌生。我有一台安装了 Apache24 的 Windows 10、64 位机器。当我尝试测试涉及“$_POST”超全局的 PHP 代码时,它会抛出此错误:“禁止 您无权访问此服务器上的 /
我在 youtube (https://www.youtube.com/watch?v=dmKBRCTjOXE) 和 (WAMP You don't have permission to access / on this server) 这个链接上查看了一个视频,但我不太确定在哪里真正添加“要求所有授权”来解决这个问题。我的“httpd-vhosts.conf”的内容看起来与 youtube 上显示的内容完全不同。我加了
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot "${SRVROOT}/docs/dummy-host.example.com"
ServerName dummy-host.example.com
ServerAlias www.dummy-host.example.com
ErrorLog "logs/dummy-host.example.com-error.log"
CustomLog "logs/dummy-host.example.com-access.log" common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host2.example.com
DocumentRoot "${SRVROOT}/docs/dummy-host2.example.com"
ServerName dummy-host2.example.com
ErrorLog "logs/dummy-host2.example.com-error.log"
CustomLog "logs/dummy-host2.example.com-access.log" common
</VirtualHost>
有什么建议吗?
【问题讨论】:
标签: php server permissions