Skip to content
Advertisement

XAMPP localhost – Access denied error 403 after changing directory

I’m using php storm for a project and I tried to change from the built in web server to the apache one as it messed with my url redirections.

Using a mac, I changed the directory to this one :

DocumentRoot "/Users/julianesimon/Desktop/CMS"
<Directory "/Users/julianesimon/Desktop/CMS">

After restarting the server, typing localhost in the search bar should direct me to the index.php file but I get :

error 403 access denied enter image description here

This is the project structure :

enter image description here

I also configured the xampp server in the deployment like this : enter image description here

The error log for the apache server give me these, so I tried reading on modifying permissions using sudo and chmod but I honestly dont know what i’m doing.

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

Advertisement

Answer

I would not advise serving from Users folder. Create a new folder in the root of your C drive and serve from there. Also make sure that you have access permissions granted.

DocumentRoot "/folder_one/folder_two"


<Directory "/folder_one/folder_two">

    Require all granted

</Directory>
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement