gpt4 book ai didi

php - 您无权访问此服务器上的/folder/index.php。 Apache/2.2.22 (Ubuntu) 服务器在 localhost 端口 80

转载 作者:行者123 更新时间:2023-12-04 19:21:39 25 4
gpt4 key购买 nike

关闭。这个问题是off-topic .它目前不接受答案。












想改进这个问题? Update the question所以它是on-topic对于堆栈溢出。


9年前关闭。







Improve this question




我正在使用 ubuntu 12.04
当我运行像“localhost/index.php”这样的索引文件时,它工作正常。
同时,当我运行像“localhost/mypage/index.php”这样的脚本时,它会返回一个名为

您无权访问此服务器上的/mypage/index.php。
Apache/2.2.22 (Ubuntu) 服务器在 localhost 端口 80


请帮我解决这个问题../谢谢

最佳答案

假设您的文件位于 /var/www并安装了 Ubuntu 提供的默认堆栈,正确的方法是将您的用户添加到 www-data组,然后 chown那个文件夹。打开终端并输入:

sudo useradd -g www-data myuser
sudo chown -R www-data /var/www/

关于php - 您无权访问此服务器上的/folder/index.php。 Apache/2.2.22 (Ubuntu) 服务器在 localhost 端口 80,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16415807/

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