12.10 403 禁止符号链接

12.10 403 禁止符号链接

我正在尝试设置一个简单的开发环境,即使设置了所有权限,我还是无法解决 403 错误

<VirtualHost *:80>
    ServerAdmin webmaster@localhost

    DocumentRoot /var/www
    <Directory />
        Options FollowSymLinks
        AllowOverride None
    </Directory>
    <Directory /var/www>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        Order allow,deny
        allow from all
    </Directory>

    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    <Directory "/usr/lib/cgi-bin">
        AllowOverride None
        Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
        Order allow,deny
        Allow from all
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

我可以访问本地主机,但不能访问链接:

<html><body><h1>It works!</h1>
<p>This is the default web page for this server.</p>
<p>The web server software is running but no content has been added, yet.</p>
<p><a href="workspace/sitepath">Site</a></p>
</body></html>

workspace目录是一个符号链接。

答案1

解决!

当我安装操作系统时,我必须勾选了加密我的主文件夹框,不确定这是否真的是问题,但我确定它没有帮助。

我将工作区目录移至/var/www/并且一切正常。

相关内容