Apache 设置虚拟目录

<VirtualHost *:80>  
    Alias /doc "/home/node/public-api/current/doc"
    <Directory "/home/node/public-api/current/doc">
            Options Indexes FollowSymLinks
            AllowOverride None
            Order allow,deny
            Allow from all
            Require all granted 

访问 , 返回没有权限访问的错误


You don't have permission to access /doc/ on this server.  
Apache/2.4.10 (Debian) Server at Port 80  


逐级查看 /home/node/public-api/current/doc 目录权限, 发现 /home/node 目录没有可执行权限

$ ls -ld /home/node
drwx------ 18 node node 4.0K Sep  6 14:55 /home/node  
$ chmod +x /home/node 
$ ls -ld /home/node
drwx--x--x 18 node node 4.0K Sep  6 14:55 /home/node  

参考: Permissions issue: how can Apache access files in my Home directory?