gpt4 book ai didi

php - 尝试使用 https 连接时,在 xampp linux 中更改 Web 根目录会出现错误 403

转载 作者:太空宇宙 更新时间:2023-11-04 12:45:54 24 4
gpt4 key购买 nike

我有一个简单的网站位于名为 test 的文件夹中,所以我调用了 http://localhost/test 并且收到了一条 Hello World! 消息.当我在 HTTPS 模式下调用它时,我也收到了同样的消息:https://localhost/test

问题是,在我将我的 Webroot htdocs 目录从 /opt/lampp/htdocs 更改为 /home/ubuntu/www 之后,我仍然能够看到通过调用 HTTP 链接获取 hello world 消息,但是当我调用 HTTPS 链接时,我得到:

Access forbidden! 

You don't have permission to access the requested
directory. There is either no index document or the directory is
read-protected. If you think this is a server error, please contact
the webmaster. Error 403

最佳答案

解决方案是同时修改位于/etc/extra/中的 httpd-ssl.conf 文件,并将我们拥有 DocumentRoot "/opt/lampp/htdocs"的第 86 行修改为新目录 "/home/Ubuntu/www"

关于php - 尝试使用 https 连接时,在 xampp linux 中更改 Web 根目录会出现错误 403,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38742485/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com