0

I installed the Apache server on Manjaro (no tag for it, Arch is the closest). It works well. I added a virtualhost and tried to set directory permissions with chmod, but no luck. I got 403 error when visiting http://localhost:8080/

Listen 8080
<VirtualHost *:8080>
    DocumentRoot "/home/inf3rno/Desktop/projects/xxx/"
    ServerName www.example2.org
    ErrorLog "/home/inf3rno/Desktop/projects/xxx/error.log"
    CustomLog "/home/inf3rno/Desktop/projects/xxx/access.log" common
    <Directory "/home/inf3rno/Desktop/projects/xxx/">
        Options Indexes FollowSymlinks Includes ExecCGI
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>

I tried chmod 775 and chmod +x on the xxx directory. With namei --long I got drwxrwxr-x inf3rno inf3rno xxx. According to the error.log search permissions are missing. Logging is ok to the files. I found many similar questions for different distros, but none of the answers fixed it. I have both index.php and index.html files in the directory, but none of them is served. For namei --long I got -rwxr-xr-x inf3rno inf3rno index.php for the files. Any idea how to fix this?

1 Answer 1

0

What worked for me is setting chmod +x for every directory along the path:

chmod +x /home
chmod +x /home/inf3rno/
chmod +x /home/inf3rno/Desktop/
chmod +x /home/inf3rno/Desktop/projects/
chmod +x /home/inf3rno/Desktop/projects/xxx/

Note this isn't a safe solution, better to have a separate user for apache, but for developing this is ok.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .