我正在用php storm做一个项目,我试着从内置的web服务器改为apache服务器,因为它扰乱了我的url重定向。
使用mac,我将目录更改为以下目录:
DocumentRoot "/Users/x/Desktop/CMS"
<Directory "/Users/x/Desktop/CMS">
重新启动服务器后,在搜索栏中键入localhost应该会将我引导到index.php文件,但我得到:
错误403访问被拒绝
项目结构如下:
我还在部署中配置了xampp服务器,如下所示:
apache服务器的错误日志给予了我这些,所以我试阅读用sudo和chmod修改权限,但我真的不知道我在做什么。
[Tue Jan 25 12:00:45.361077 2022] [core:error] [pid 4447] (13)Permission denied: [client ::1:49579] AH00035: access to / denied (filesystem path '/Users/x/Desktop') because search permissions are missing on a component of the path
[Tue Jan 25 12:00:45.430624 2022] [core:error] [pid 4447] (13)Permission denied: [client ::1:49579] AH00035: access to /favicon.ico denied (filesystem path '/Users/x/Desktop') because search permissions are missing on a component of the path, referer: http://localhost/
[Tue Jan 25 12:00:45.527855 2022] [core:error] [pid 4447] (13)Permission denied: [client ::1:49579] AH00035: access to / denied (filesystem path '/Users/x/Desktop') because search permissions are missing on a component of the path
[Tue Jan 25 12:00:45.580902 2022] [core:error] [pid 4447] (13)Permission denied: [client ::1:49579] AH00035: access to /favicon.ico denied (filesystem path '/Users/x/Desktop') because search permissions are missing on a component of the path, referer: http://localhost/
1条答案
按热度按时间xfb7svmp1#
我不建议从用户文件夹提供服务。在C驱动器的根目录下创建一个新文件夹,然后从那里提供服务。还要确保您有被授予的访问权限。