dongli1920 2019-04-21 23:31
浏览 180

禁止访问:您无权访问此服务器上的/ <Windows

Sorry guys I am extremely noob on this Apache setup. I have a Windows 10, 64 bit machine in which Apache24 is installed. When I try to test and kind of PHP code that involves "$_POST" superglobal it throws this error: "Forbidden You don't have permission to access /< on this server."

I checked a video on youtube (https://www.youtube.com/watch?v=dmKBRCTjOXE) and (WAMP You don't have permission to access / on this server) this link but I am not quite sure where to really add "Require all granted" to resolve this issue. The content of my "httpd-vhosts.conf" looks really different than the one shown on youtube. I added

<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>

Any suggestions?

  • 写回答

1条回答 默认 最新

  • doubu8643 2019-04-22 00:48
    关注

    IN YOUR httpd-vhosts.conf FILE WRITE

    <VirtualHost *:80>
        DocumentRoot "Your Site Path"
        ServerName yourdevsite.com
    </VirtualHost>
    

    Then Open Your HOST FILE YOU CAN FIND THIS FILE AT C:\Windows\System32\drivers\etc AND ADD THESE LINES

    127.0.0.1 yourdevsite.com
    

    That's it

    评论

报告相同问题?

悬赏问题

  • ¥15 有人知道怎么将自己的迁移策略布到edgecloudsim上使用吗?
  • ¥15 错误 LNK2001 无法解析的外部符号
  • ¥50 安装pyaudiokits失败
  • ¥15 计组这些题应该咋做呀
  • ¥60 更换迈创SOL6M4AE卡的时候,驱动要重新装才能使用,怎么解决?
  • ¥15 让node服务器有自动加载文件的功能
  • ¥15 jmeter脚本回放有的是对的有的是错的
  • ¥15 r语言蛋白组学相关问题
  • ¥15 Python时间序列如何拟合疏系数模型
  • ¥15 求学软件的前人们指明方向🥺