XAMPP localhost - 更改目录后访问被拒绝错误 403
XAMPP localhost - Access denied error 403 after changing directory
我正在为一个项目使用 php storm,我试图从内置 Web 服务器更改为 apache,因为它扰乱了我的 url 重定向。
使用 mac,我将目录更改为这个:
DocumentRoot "/Users/julianesimon/Desktop/CMS"
<Directory "/Users/julianesimon/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/julianesimon/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/julianesimon/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/julianesimon/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/julianesimon/Desktop') because search permissions are missing on a component of the path, referer: http://localhost/
我不建议从用户文件夹提供服务。在 C 驱动器的根目录中创建一个新文件夹并从那里提供服务。还要确保您已授予访问权限。
DocumentRoot "/folder_one/folder_two"
<Directory "/folder_one/folder_two">
Require all granted
</Directory>
我正在为一个项目使用 php storm,我试图从内置 Web 服务器更改为 apache,因为它扰乱了我的 url 重定向。
使用 mac,我将目录更改为这个:
DocumentRoot "/Users/julianesimon/Desktop/CMS"
<Directory "/Users/julianesimon/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/julianesimon/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/julianesimon/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/julianesimon/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/julianesimon/Desktop') because search permissions are missing on a component of the path, referer: http://localhost/
我不建议从用户文件夹提供服务。在 C 驱动器的根目录中创建一个新文件夹并从那里提供服务。还要确保您已授予访问权限。
DocumentRoot "/folder_one/folder_two"
<Directory "/folder_one/folder_two">
Require all granted
</Directory>