Serve from user directory

Problems with the Linux version of XAMPP, questions, comments, and anything related.

Serve from user directory

Postby dpicassom » 06. June 2024 15:53

Hello, I've been doing the development from a user directory, and I don't want to move it to htdocs within /opt, because it's a pain in the arse using sudo all the time and vscode wont work to save changes. I want to debug there.

But everyone i try to set the user directory , or a soft link, it says forbidden access, and i tried to modify directory behaviour in the conf file to no avail.


Any help would be appreciated.
dpicassom
 
Posts: 2
Joined: 06. June 2024 15:29
XAMPP version: 8.1.25-0
Operating System: Linux (Arch derivative)

Re: Serve from user directory

Postby Nobbie » 08. June 2024 22:39

Apache is running with a different UserId than your own. See httpd.conf and watch out for "User" and "Group" setting, these are the UserID and Group which Apache is using.

You have to grant sufficient rights to your "user directory" (you probably mean /home/username) for the User running Apache, also grant sufficient rights to /home folder for the User running Apache.

If you did correctly, you also have to allow Apache within the Apache configuration to read the DocumentRoot, i.e. using "Require all granted" clause. As you dont show any of your "everyone i try", i cannot say what you are missing. Also your error description is rather poor, "it says forbidden access" is NOT what Apache says, you definately get an Errorcode at least (either 404 or 403). If you need help, you have to apply much more information.
Nobbie
 
Posts: 13274
Joined: 09. March 2008 13:04


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 11 guests