0

I'm new to apache. I'm trying to create an alias to my project folder which is in home/Documents/Projects/blog directory.

I added this to httpd configs:

Alias /blog "/home/ehsan/Documents/Projects/blog/ui/dist"   
<Directory "/home/ehsan/Documents/Projects/blog/ui/dist">
    DirectoryIndex index.html
    AllowOverride All
    Options FollowSymlinks
    Require all granted
</Directory>

I did this also:

sudo chmod -R 775 /home/ehsan/Documents/Projects/leitner/ui/dist

but I get "403 Access forbidden!" error.

I did the same thing for phpmyadmin and it works.

I read somewhere that apache should have access to all the higher level directories. is that true?

apache version: 2.4.41 (Unix)

os: manjaro 18

kiasaty
  • 187
  • 1
  • 11

1 Answers1

0

I think you can make apache the owner of the folder which it's gonna make changes in it. Try this: head to your project directory as below

cd /home/ehsan/Documents/Projects/leitner

and then :

chown -R www-data:www-data ui/

if there was any error going on, send the log of apache here would be helpful

  • (13)Permission denied: access to /leitner denied (filesystem path '/home/ehsan/Documents') because search permissions are missing on a component of the path. is it wrong to make apache owner of these directories security-wise? – kiasaty Apr 17 '20 at 05:32